codecov_carryforward_reports.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: Carry forward codecov reports
  2. # This workflow carries forward coverage reports for commits in master
  3. # The coverage reports are generated by .github/workflows/codecov_per_test_coverage.yml
  4. # By carrying forward the reports and uploading the static analysis information
  5. # We can use the commits in master as the BASE for Automated Test Selection
  6. # see .github/workflows/codecov_ats.yml
  7. on:
  8. push:
  9. branches: [master]
  10. jobs:
  11. carryforward-reports-and-upload-static-analysis:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  15. - name: Set up Python 3.10.10
  16. uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
  17. with:
  18. python-version: '3.10.10'
  19. - name: Download Codecov CLI
  20. run: |
  21. pip install --extra-index-url https://pypi.org/simple --no-cache-dir pytest codecov-cli==0.4.0
  22. # Creates the commit and report objects in codecov
  23. # This carries forward previouly uploaded coverage reports to the new commit
  24. - name: Codecov startup
  25. run: |
  26. codecovcli create-commit
  27. codecovcli create-report
  28. env:
  29. CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
  30. # Sends static analysis information to codecov
  31. # This is used as an input in Codecov Automated Test Selection.
  32. # It's necessary so we can use this commit as the BASE for comparison
  33. - name: Static Analysis
  34. run: |
  35. codecovcli static-analysis --token=${CODECOV_STATIC_TOKEN} \
  36. --folders-to-exclude .artifacts \
  37. --folders-to-exclude .github \
  38. --folders-to-exclude .venv \
  39. --folders-to-exclude static \
  40. --folders-to-exclude bin
  41. env:
  42. CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
  43. CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}