diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 51a1bba6..7fafe9cf 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -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 diff --git a/g1.sh b/g1.sh index 548abf35..9c4baedd 100755 --- a/g1.sh +++ b/g1.sh @@ -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 diff --git a/g2.sh b/g2.sh index 12385b90..284c0e93 100755 --- a/g2.sh +++ b/g2.sh @@ -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