From: Sebastián Ramírez Date: Fri, 21 Feb 2025 11:59:48 +0000 (+0100) Subject: 👷 Add Codecov to CI, Smokeshow/Cloudflare has been flaky lately (#1303) X-Git-Tag: 0.0.23~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=759220d5928af4a01c205a039eb9826456a475cd;p=thirdparty%2Ffastapi%2Fsqlmodel.git 👷 Add Codecov to CI, Smokeshow/Cloudflare has been flaky lately (#1303) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9126db93..c924e54e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,13 +74,23 @@ jobs: env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} + # TODO: if removing Smokeshow, and moving only to Codecov, remove this + # Upload files before running Codecov, as it generates an extra file coverage/coverage.xml, and that breaks coverage-combine - name: Store coverage files uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} path: coverage include-hidden-files: true + - uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + files: ./coverage.xml + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + # TODO: if removing Smokeshow, and moving only to Codecov, remove this coverage-combine: needs: - test diff --git a/scripts/test.sh b/scripts/test.sh index ff4b114b..826ae903 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,3 +7,4 @@ coverage run -m pytest tests coverage combine coverage report coverage html +coverage xml