diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 8694ac1905651c..4eb92f94c3465d 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -104,6 +104,7 @@ jobs: - name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }}) run: | make test-python-ci + coverage json -o .artifacts/python.coverage.json --show-contexts # Upload coverage data even if running the tests step fails since # it reduces large coverage fluctuations @@ -112,7 +113,13 @@ jobs: uses: ./.github/actions/artifacts with: token: ${{ secrets.CODECOV_TOKEN }} - + # This is temporary because codecov/codecov-action@v4-beta + # Doesn't support --disable-search option + # And we don't want to upload random reports (for safety) + - name: Clean state of uploads - special case to test Codecov ATS + if: ${{ always() }} + run: rm .artifacts/python.coverage.xml + continue-on-error: true - name: Upload coverage - special case to test Codecov ATS if: ${{ always() }} uses: codecov/codecov-action@v4-beta diff --git a/Makefile b/Makefile index 7b33bca2bc5fc6..f059d4f664031d 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,7 @@ test-python-ci: create-db tests/sentry \ tests/sentry_plugins \ tests/symbolicator \ - --cov . --cov-report="json:.artifacts/python.coverage.json" --cov-report="xml:.artifacts/python.coverage.xml" --cov-context=test + --cov . --cov-report="xml:.artifacts/python.coverage.xml" --cov-context=test @echo "" diff --git a/codecov.yml b/codecov.yml index 97f03197f9807e..bb59dba066f595 100644 --- a/codecov.yml +++ b/codecov.yml @@ -92,7 +92,9 @@ cli: report_type: "json" compress-pycoverage: file_to_compress: ".artifacts/python.coverage.json" - delete_uncompressed: false + # We don't want to upload the original coverage report by accident + # Because it's too big + delete_uncompressed: true runners: python: include_curr_dir: true