forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.98 KB
/
west-commands.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: NCS west commands
on:
pull_request:
branches: [main]
paths:
- scripts/west_commands/**
- scripts/requirements-west-ncs-sbom.txt
- scripts/requirements-extra.txt
jobs:
west_commands_job:
runs-on: ubuntu-latest
name: Run Python checks for west commands on patch series (PR)
steps:
- name: Checkout the code
uses: nrfconnect/action-checkout-west-update@main
with:
path: ncs/nrf
git-ref: ${{ github.event.pull_request.head.sha }}
git-fetch-depth: 0
- name: Install python dependencies
working-directory: ncs/nrf
run: |
pip3 install -U pip
pip3 install -U setuptools
pip3 install -U wheel
pip3 install -U mypy types-colorama types-editdistance types-PyYAML
grep -E "west==" scripts/requirements-fixed.txt | cut -f1 -d"#" | cut -d ' ' -f '1'| xargs pip3 install -U
pip3 show -f west
- name: Run mypy
working-directory: ncs/nrf/scripts/west_commands
run: |
python3 -m mypy --config-file mypy.ini ncs_west_helpers.py pygit2_helpers.py ncs_commands.py
run-west-cmds:
name: Run smoke tests for ncs west commands
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: nrfconnect/action-checkout-west-update@main
with:
git-fetch-depth: 0
path: nrf
- name: Install requirements
shell: bash
run: |
pip3 install -r nrf/scripts/requirements-west-ncs-sbom.txt
pip3 install -r nrf/scripts/requirements-extra.txt
- name: Test ncs-sbom with asset tracker sample
shell: bash
run: |
west ncs-sbom --input-files nrf/applications/asset_tracker_v2/**/*.c
- name: Smoke test ncs-loot & ncs-compare
shell: bash
run: |
west ncs-loot -h
west ncs-compare -h