[CI/CD] Rebalanced groups and combined coverage (experimental)

This commit is contained in:
Salvador E. Tropea 2022-07-14 19:52:49 -03:00
parent 19519dd85a
commit b70d2b0b1d
3 changed files with 57 additions and 2 deletions

View File

@ -59,6 +59,14 @@ jobs:
# Run the 90% faster tests (under 3 s)
# Do it in parallel
./${{ matrix.w_tests }}.sh
- name: Store coverage
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Test_Coverage_${{ matrix.ki_release }}_${{ matrix.w_tests }}
path: .coverage.*
- name: Collect coverage ${{ matrix.ki_release }}
run: |
python3-coverage combine
python3-coverage report
python3-coverage html -d output/htmlcov_${{ matrix.w_tests }}
@ -83,6 +91,53 @@ jobs:
#echo Disabled by now
coveralls
consolidate_coverage:
name: Consolidate coverage data
runs-on: ubuntu-latest
needs: test
- name: Download coverage k5 g1
uses: actions/download-artifact@v3
with:
name: Test_Coverage_latest_g1
- name: Download coverage k5 g2
uses: actions/download-artifact@v3
with:
name: Test_Coverage_latest_g2
- name: Download coverage k5 g3
uses: actions/download-artifact@v3
with:
name: Test_Coverage_latest_g3
- name: Download coverage k6 g1
uses: actions/download-artifact@v3
with:
name: Test_Coverage_ki6_g1
- name: Download coverage k6 g2
uses: actions/download-artifact@v3
with:
name: Test_Coverage_ki6_g2
- name: Download coverage k6 g3
uses: actions/download-artifact@v3
with:
name: Test_Coverage_ki6_g3
- name: Combine coverage
run: |
python3-coverage combine
python3-coverage report
python3-coverage html -d htmlcov
- name: Store result
uses: actions/upload-artifact@v3
with:
name: Test_Coverage_combined
path: htmlcov
push_to_registry:
name: Push Docker image to Docker Hub

2
g1.sh
View File

@ -1,5 +1,3 @@
#!/bin/sh
# Fast tests
pytest -v --durations=0 -m "not slow" -n 2 --test_dir=output
# KiCad2Step tests
pytest -v --durations=0 -m "slow and (not (pcbnew or eeschema))" --test_dir=output

2
g2.sh
View File

@ -1,3 +1,5 @@
#!/bin/sh
# Eeschema tests
pytest -v --durations=0 -m "eeschema" --test_dir=output
# KiCad2Step tests and others
pytest -v --durations=0 -m "slow and (not (pcbnew or eeschema))" --test_dir=output