|
1 | 1 | name: CI |
| 2 | +concurrency: |
| 3 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 4 | + cancel-in-progress: true |
2 | 5 | on: |
3 | 6 | push: |
4 | 7 | branches: |
|
8 | 11 | - master |
9 | 12 |
|
10 | 13 | jobs: |
| 14 | + validate: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: |
| 19 | + - "3.12" |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + persist-credentials: false |
| 24 | + - name: Install Python ${{ matrix.python-version }} |
| 25 | + uses: actions/setup-python@v5 |
| 26 | + with: |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + - name: Install meshtastic from local |
| 29 | + run: | |
| 30 | + python -m pip install --upgrade pip |
| 31 | + pip3 install poetry |
| 32 | + poetry install --all-extras --with dev,powermon |
| 33 | + poetry run meshtastic --version |
| 34 | +
|
11 | 35 | build: |
| 36 | + needs: validate |
12 | 37 | runs-on: ubuntu-latest |
13 | 38 | strategy: |
14 | 39 | matrix: |
|
21 | 46 | - "3.14" |
22 | 47 | steps: |
23 | 48 | - uses: actions/checkout@v4 |
24 | | - - name: Install Python 3 |
| 49 | + - name: Install Python ${{ matrix.python-version }} |
25 | 50 | uses: actions/setup-python@v5 |
| 51 | + with: |
| 52 | + python-version: ${{ matrix.python-version }} |
26 | 53 | - name: Uninstall meshtastic |
27 | 54 | run: | |
28 | 55 | pip3 uninstall -y meshtastic |
|
34 | 61 | run: | |
35 | 62 | poetry install --all-extras --with dev,powermon |
36 | 63 | poetry run meshtastic --version |
37 | | - - name: Run pylint |
38 | | - run: poetry run pylint meshtastic examples/ --ignore-patterns ".*_pb2.pyi?$" |
39 | | - - name: Check types with mypy |
40 | | - run: poetry run mypy meshtastic/ |
41 | | - - name: Run tests with pytest |
42 | | - run: poetry run pytest --cov=meshtastic |
43 | | - - name: Generate coverage report |
44 | | - run: | |
45 | | - poetry run pytest --cov=meshtastic --cov-report=xml |
| 64 | + - name: Run lint, type check, and tests in parallel |
| 65 | + run: make -j3 --output-sync=target ci |
46 | 66 | - name: Upload coverage to Codecov |
47 | 67 | uses: codecov/codecov-action@v4 |
48 | 68 | with: |
|
53 | 73 | name: codecov-umbrella |
54 | 74 | fail_ci_if_error: true |
55 | 75 | verbose: true |
56 | | - validate: |
57 | | - runs-on: ubuntu-latest |
58 | | - strategy: |
59 | | - matrix: |
60 | | - python-version: |
61 | | - - "3.12" |
62 | | - steps: |
63 | | - - uses: actions/checkout@v4 |
64 | | - with: |
65 | | - persist-credentials: false |
66 | | - - name: Install Python 3 |
67 | | - uses: actions/setup-python@v5 |
68 | | - - name: Install meshtastic from local |
69 | | - run: | |
70 | | - python -m pip install --upgrade pip |
71 | | - pip3 install poetry |
72 | | - poetry install |
73 | | - poetry run meshtastic --version |
74 | 76 |
|
75 | 77 | simradio_testing: |
| 78 | + needs: [validate, build] |
76 | 79 | runs-on: ubuntu-latest |
77 | 80 | strategy: |
78 | 81 | fail-fast: false |
|
0 commit comments