coverage.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: 📊 Code coverage test
  2. run-name: 📊 Code coverage test ${{ github.sha }}
  3. on:
  4. #workflow_run:
  5. # workflows: [ 🔬 Test ]
  6. # types: [ completed ]
  7. workflow_dispatch:
  8. # cancels the previous workflow run when a new one appears in the same branch (e.g. master or a PR's branch)
  9. concurrency:
  10. group: coverage_${{ github.ref }}
  11. cancel-in-progress: true
  12. jobs:
  13. commit_info:
  14. if: ${{ github.event.workflow_run.conclusion == 'success' }}
  15. name: Commit info
  16. runs-on: ubuntu-22.04
  17. steps:
  18. - run: |
  19. echo "# Coverage tests of commit ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
  20. echo "* Commit URL: [${{ github.sha }}](/${{ github.repository }}/commit/${{ github.sha }})" >> $GITHUB_STEP_SUMMARY
  21. echo "* Initiated by: [@${{ github.actor }}](https://github.com/${{ github.actor }})" >> $GITHUB_STEP_SUMMARY
  22. echo "* Ref: ${{ github.ref_type }} \"${{ github.ref_name }}\"" >> $GITHUB_STEP_SUMMARY
  23. echo "* Attempt: ${{ github.run_attempt }}" >> $GITHUB_STEP_SUMMARY
  24. simple_build:
  25. if: ${{ github.event.workflow_run.conclusion == 'success' }}
  26. uses: ./.github/workflows/build_template.yml
  27. with:
  28. CTEST_CMAKE_GENERATOR: "Unix Makefiles" # as Ninja fails with coverage
  29. CTEST_CONFIGURATION_TYPE: "Debug"
  30. WITH_COVERAGE: 1
  31. simple_test_coverage:
  32. needs: simple_build
  33. uses: ./.github/workflows/test_template.yml
  34. with:
  35. WITH_COVERAGE: 1
  36. artifact_name: test_debug_coverage
  37. build_artifact_name: build_jammy_Debug_x86_64
  38. timeout: 20