Skip to content

Commit 3f62c09

Browse files
committed
More CI optimization: run tests only once, run pylint/mypy/tests in parallel with make
1 parent a509bca commit 3f62c09

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,8 @@ jobs:
6161
run: |
6262
poetry install --all-extras --with dev,powermon
6363
poetry run meshtastic --version
64-
- name: Run pylint
65-
run: poetry run pylint meshtastic examples/ --ignore-patterns ".*_pb2.pyi?$"
66-
- name: Check types with mypy
67-
run: poetry run mypy meshtastic/
68-
- name: Run tests with pytest
69-
run: poetry run pytest --cov=meshtastic
70-
- name: Generate coverage report
71-
run: |
72-
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
7366
- name: Upload coverage to Codecov
7467
uses: codecov/codecov-action@v4
7568
with:

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,19 @@ cov:
4242
examples: FORCE
4343
pytest -mexamples
4444

45+
# CI targets (run via poetry, executed in parallel by the CI workflow)
46+
.PHONY: ci-pylint ci-mypy ci-test ci
47+
48+
ci-pylint:
49+
poetry run pylint meshtastic examples/ --ignore-patterns ".*_pb2.pyi?$$"
50+
51+
ci-mypy:
52+
poetry run mypy meshtastic/
53+
54+
ci-test:
55+
poetry run pytest --cov=meshtastic --cov-report=xml
56+
57+
ci: ci-pylint ci-mypy ci-test
58+
4559
# Makefile hack to get the examples to always run
4660
FORCE: ;

0 commit comments

Comments
 (0)