build: launch pcc targets in parallel to speed up checks

- change call in github actions as proper flags are in the Makefile
- change mypy_ci target to avoid cache issues with multiple mypy instances
This commit is contained in:
Arthur Meyre
2021-08-12 12:10:17 +02:00
parent 553f77f19b
commit 63eac35a43
2 changed files with 11 additions and 5 deletions

View File

@@ -54,10 +54,9 @@ jobs:
- name: Conformance
id: conformance
if: ${{ success() && !cancelled() }}
# keep going registers errors in the intermediate targets but executes them all
# Nicer to have pcc complete for the dev and have all the relevant conformance issues
# pcc launches an internal target with proper flags
run: |
make --keep-going pcc
make pcc
- name: PyTest
id: pytest
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}

View File

@@ -34,9 +34,13 @@ python_linting: pylint flake8
conformance: python_format
.PHONY: conformance
pcc: check_python_format python_linting mypy_ci pydocstyle
pcc:
@$(MAKE) --keep-going --jobs $$(nproc) --output-sync --no-print-directory pcc_internal
.PHONY: pcc
pcc_internal: check_python_format python_linting mypy_ci pydocstyle
.PHONY: pcc_internal
pytest:
poetry run pytest --cov=hdk -vv --cov-report=xml tests/
.PHONY: pytest
@@ -60,7 +64,10 @@ mypy_benchmark:
find ./benchmarks/ -name "*.py" | xargs poetry run mypy --ignore-missing-imports
.PHONY: mypy_benchmark
mypy_ci: mypy mypy_test mypy_benchmark
mypy_ci:
@$(MAKE) --no-print-directory mypy
@$(MAKE) --no-print-directory mypy_test
@$(MAKE) --no-print-directory mypy_benchmark
.PHONY: mypy_ci
pytest_and_coverage: pytest coverage