Skip to content

Commit f5c3eb3

Browse files
MirkoCovizzieivindj-nordic
authored andcommitted
workflows: adjust indentation
This will make sure that YAMLLint won't complain about the following error when making changes: `YAMLLint (indentation):wrong indentation: expected 6 but found 4` Signed-off-by: Mirko Covizzi <[email protected]>
1 parent 2cde6ff commit f5c3eb3

File tree

4 files changed

+259
-259
lines changed

4 files changed

+259
-259
lines changed

.github/workflows/build_samples.yml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,55 +21,55 @@ jobs:
2121
shell: bash
2222

2323
steps:
24-
- name: Checkout the code
25-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
26-
with:
27-
path: nrf-bm
28-
fetch-depth: 0
24+
- name: Checkout the code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
26+
with:
27+
path: nrf-bm
28+
fetch-depth: 0
2929

30-
- name: restore-cache-sdk
31-
id: cache-sdk
32-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4
33-
with:
34-
path: |
35-
nrf
36-
zephyr
37-
modules
38-
key: ${{ runner.os }}-nrf-sdk
30+
- name: restore-cache-sdk
31+
id: cache-sdk
32+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4
33+
with:
34+
path: |
35+
nrf
36+
zephyr
37+
modules
38+
key: ${{ runner.os }}-nrf-sdk
3939

40-
- name: Prepare west project
41-
run: |
42-
west init -l nrf-bm
43-
west update -o=--depth=1 -n
40+
- name: Prepare west project
41+
run: |
42+
west init -l nrf-bm
43+
west update -o=--depth=1 -n
4444
45-
- name: Build samples
46-
working-directory: nrf-bm
47-
run: |
48-
west twister -T samples --build-only -v --inline-logs --integration
45+
- name: Build samples
46+
working-directory: nrf-bm
47+
run: |
48+
west twister -T samples --build-only -v --inline-logs --integration
4949
50-
- name: upload-logs
51-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
52-
if: ${{ failure() && !contains(github.event.pull_request.user.login, 'dependabot[bot]') }}
53-
with:
54-
name: build-logs
55-
path: nrf-bm/twister-out/**/*.log
56-
retention-days: 5
50+
- name: upload-logs
51+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
52+
if: ${{ failure() && !contains(github.event.pull_request.user.login, 'dependabot[bot]') }}
53+
with:
54+
name: build-logs
55+
path: nrf-bm/twister-out/**/*.log
56+
retention-days: 5
5757

58-
- name: upload-artifacts-dispatch
59-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
60-
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true &&
61-
github.event_name == 'workflow_dispatch'
62-
with:
63-
name: build-artifacts
64-
path: nrf-bm/twister-out/**
65-
retention-days: 5
58+
- name: upload-artifacts-dispatch
59+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
60+
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true &&
61+
github.event_name == 'workflow_dispatch'
62+
with:
63+
name: build-artifacts
64+
path: nrf-bm/twister-out/**
65+
retention-days: 5
6666

67-
- name: save-cache-sdk
68-
if: always() && steps.cache-sdk.outputs.cache-hit != 'true'
69-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4
70-
with:
71-
path: |
72-
nrf
73-
zephyr
74-
modules
75-
key: ${{ steps.cache-sdk.outputs.cache-primary-key }}
67+
- name: save-cache-sdk
68+
if: always() && steps.cache-sdk.outputs.cache-hit != 'true'
69+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4
70+
with:
71+
path: |
72+
nrf
73+
zephyr
74+
modules
75+
key: ${{ steps.cache-sdk.outputs.cache-primary-key }}

.github/workflows/compliance.yml

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -10,106 +10,106 @@ jobs:
1010
runs-on: ubuntu-24.04
1111
name: Run compliance checks on patch series (PR)
1212
steps:
13-
- name: Update PATH for west
14-
run: |
15-
echo "$HOME/.local/bin" >> $GITHUB_PATH
13+
- name: Update PATH for west
14+
run: |
15+
echo "$HOME/.local/bin" >> $GITHUB_PATH
1616
17-
- name: Checkout sources
18-
uses: nrfconnect/action-checkout-west-update@main
19-
with:
20-
git-fetch-depth: 0
21-
git-ref: ${{ github.event.pull_request.head.sha }}
22-
rebase: true
23-
path: ncs/nrf-bm
17+
- name: Checkout sources
18+
uses: nrfconnect/action-checkout-west-update@main
19+
with:
20+
git-fetch-depth: 0
21+
git-ref: ${{ github.event.pull_request.head.sha }}
22+
rebase: true
23+
path: ncs/nrf-bm
2424

25-
- name: cache-pip
26-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
27-
with:
28-
path: ~/.cache/pip
29-
key: ${{ runner.os }}-doc-pip
25+
- name: cache-pip
26+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-doc-pip
3030

31-
- name: Install python dependencies
32-
working-directory: ncs/nrf
33-
run: |
34-
pip3 install -U pip
35-
pip3 install -U wheel
36-
grep -E "^setuptools" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
37-
grep -E "^python-magic=|^junitparser|^lxml|^gitlint|^pylint|^pykwalify|^yamllint|^unidiff|^vermin|^python-dotenv|^ruff|^tabulate" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
38-
grep -E "^west" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
39-
pip3 show -f west
31+
- name: Install python dependencies
32+
working-directory: ncs/nrf
33+
run: |
34+
pip3 install -U pip
35+
pip3 install -U wheel
36+
grep -E "^setuptools" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
37+
grep -E "^python-magic=|^junitparser|^lxml|^gitlint|^pylint|^pykwalify|^yamllint|^unidiff|^vermin|^python-dotenv|^ruff|^tabulate" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
38+
grep -E "^west" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
39+
pip3 show -f west
4040
41-
- name: Run merge commits test
42-
env:
43-
BASE_REF: ${{ github.base_ref }}
44-
working-directory: ncs/nrf-bm
45-
run: |
46-
# Ensure there's no merge commits in the PR
47-
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
48-
(echo "::error ::Merge commits not allowed, rebase instead";false)
41+
- name: Run merge commits test
42+
env:
43+
BASE_REF: ${{ github.base_ref }}
44+
working-directory: ncs/nrf-bm
45+
run: |
46+
# Ensure there's no merge commits in the PR
47+
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
48+
(echo "::error ::Merge commits not allowed, rebase instead";false)
4949
50-
- name: Run CODEOWNERS test
51-
id: codeowners
52-
env:
53-
BASE_REF: ${{ github.base_ref }}
54-
working-directory: ncs/nrf-bm
55-
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
56-
run: |
57-
../nrf/scripts/ci/codeowners.py -c origin/${BASE_REF}..
50+
- name: Run CODEOWNERS test
51+
id: codeowners
52+
env:
53+
BASE_REF: ${{ github.base_ref }}
54+
working-directory: ncs/nrf-bm
55+
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
56+
run: |
57+
../nrf/scripts/ci/codeowners.py -c origin/${BASE_REF}..
5858
59-
- name: Get NCS modules needed for compliance tests to run
60-
working-directory: ncs/nrf-bm
61-
run: |
62-
patch -p1 < scripts/ci/ci-compliance.diff
63-
west update
59+
- name: Get NCS modules needed for compliance tests to run
60+
working-directory: ncs/nrf-bm
61+
run: |
62+
patch -p1 < scripts/ci/ci-compliance.diff
63+
west update
6464
65-
- name: Run Compliance Tests
66-
continue-on-error: true
67-
id: compliance
68-
env:
69-
BASE_REF: ${{ github.base_ref }}
70-
working-directory: ncs/nrf-bm
71-
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
72-
run: |
73-
export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
74-
# debug
75-
ls -la
76-
git log --pretty=oneline | head -n 10
77-
$ZEPHYR_BASE/scripts/ci/check_compliance.py --annotate \
78-
-e KconfigBasicNoModules -e ClangFormat \
79-
-e SysbuildKconfigBasicNoModules \
80-
-c origin/${BASE_REF}..
65+
- name: Run Compliance Tests
66+
continue-on-error: true
67+
id: compliance
68+
env:
69+
BASE_REF: ${{ github.base_ref }}
70+
working-directory: ncs/nrf-bm
71+
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
72+
run: |
73+
export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
74+
# debug
75+
ls -la
76+
git log --pretty=oneline | head -n 10
77+
$ZEPHYR_BASE/scripts/ci/check_compliance.py --annotate \
78+
-e KconfigBasicNoModules -e ClangFormat \
79+
-e SysbuildKconfigBasicNoModules \
80+
-c origin/${BASE_REF}..
8181
82-
- name: upload-results
83-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
84-
continue-on-error: true
85-
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
86-
with:
87-
name: compliance.xml
88-
path: ncs/nrf-bm/compliance.xml
89-
overwrite: true
82+
- name: upload-results
83+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
84+
continue-on-error: true
85+
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
86+
with:
87+
name: compliance.xml
88+
path: ncs/nrf-bm/compliance.xml
89+
overwrite: true
9090

91-
- name: check-warns
92-
working-directory: ncs/nrf-bm
93-
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
94-
run: |
95-
export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
96-
if [[ ! -s "compliance.xml" ]]; then
97-
exit 1;
98-
fi
99-
100-
files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l))
101-
for file in "${files[@]}"; do
102-
f="${file}.txt"
103-
if [[ -s $f ]]; then
104-
errors=$(cat $f)
105-
errors="${errors//'%'/'%25'}"
106-
errors="${errors//$'\n'/'%0A'}"
107-
errors="${errors//$'\r'/'%0D'}"
108-
echo "::error file=${f}::$errors"
109-
exit=1
91+
- name: check-warns
92+
working-directory: ncs/nrf-bm
93+
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
94+
run: |
95+
export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
96+
if [[ ! -s "compliance.xml" ]]; then
97+
exit 1;
11098
fi
111-
done
11299
113-
if [ "${exit}" == "1" ]; then
114-
exit 1;
115-
fi
100+
files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l))
101+
for file in "${files[@]}"; do
102+
f="${file}.txt"
103+
if [[ -s $f ]]; then
104+
errors=$(cat $f)
105+
errors="${errors//'%'/'%25'}"
106+
errors="${errors//$'\n'/'%0A'}"
107+
errors="${errors//$'\r'/'%0D'}"
108+
echo "::error file=${f}::$errors"
109+
exit=1
110+
fi
111+
done
112+
113+
if [ "${exit}" == "1" ]; then
114+
exit 1;
115+
fi

0 commit comments

Comments
 (0)