|
4 | 4 | pull_request: |
5 | 5 | branches: [main] |
6 | 6 | paths: |
7 | | - - scripts/west_commands/mypy.ini |
8 | | - - scripts/west_commands/ncs_commands.py |
9 | | - - scripts/west_commands/ncs_west_helpers.py |
10 | | - - scripts/west_commands/pygit2_helpers.py |
| 7 | + - scripts/west_commands/** |
| 8 | + - scripts/requirements-west-ncs-sbom.txt |
| 9 | + - scripts/requirements-extra.txt |
11 | 10 |
|
12 | 11 | jobs: |
13 | 12 | west_commands_job: |
14 | 13 | runs-on: ubuntu-latest |
15 | 14 | name: Run Python checks for west commands on patch series (PR) |
16 | 15 | steps: |
17 | 16 | - name: Checkout the code |
18 | | - uses: actions/checkout@v3 |
| 17 | + uses: nrfconnect/action-checkout-west-update@main |
19 | 18 | with: |
20 | 19 | path: ncs/nrf |
21 | | - ref: ${{ github.event.pull_request.head.sha }} |
22 | | - fetch-depth: 0 |
23 | | - - name: cache-pip |
24 | | - uses: actions/cache@v3 |
25 | | - with: |
26 | | - path: ~/.cache/pip |
27 | | - key: ${{ runner.os }}-doc-pip |
| 20 | + git-ref: ${{ github.event.pull_request.head.sha }} |
| 21 | + git-fetch-depth: 0 |
28 | 22 | - name: Install python dependencies |
29 | 23 | working-directory: ncs/nrf |
30 | 24 | run: | |
|
38 | 32 | working-directory: ncs/nrf/scripts/west_commands |
39 | 33 | run: | |
40 | 34 | python3 -m mypy --config-file mypy.ini ncs_west_helpers.py pygit2_helpers.py ncs_commands.py |
| 35 | +
|
| 36 | + run-west-cmds: |
| 37 | + name: Run smoke tests for ncs west commands |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + os: [ubuntu-latest, macos-13, windows-latest] |
| 42 | + runs-on: ${{ matrix.os }} |
| 43 | + steps: |
| 44 | + - name: Checkout sources |
| 45 | + uses: nrfconnect/action-checkout-west-update@main |
| 46 | + with: |
| 47 | + git-fetch-depth: 0 |
| 48 | + path: nrf |
| 49 | + - name: Install requirements |
| 50 | + shell: bash |
| 51 | + run: | |
| 52 | + pip3 install -r nrf/scripts/requirements-west-ncs-sbom.txt |
| 53 | + pip3 install -r nrf/scripts/requirements-extra.txt |
| 54 | + - name: Test ncs-sbom with asset tracker sample |
| 55 | + shell: bash |
| 56 | + run: | |
| 57 | + west ncs-sbom --input-files nrf/applications/asset_tracker_v2/**/*.c |
| 58 | + - name: Smoke test ncs-loot & ncs-compare |
| 59 | + shell: bash |
| 60 | + run: | |
| 61 | + west ncs-loot -h |
| 62 | + west ncs-compare -h |
0 commit comments