forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.21 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
name: NCS west commands
on:
pull_request:
branches: [main]
paths:
- scripts/west_commands/mypy.ini
- scripts/west_commands/ncs_commands.py
- scripts/west_commands/ncs_west_helpers.py
- scripts/west_commands/pygit2_helpers.py
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: actions/checkout@v3
with:
path: ncs/nrf
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip
- 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 | 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