]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
👷 Add Codecov to CI, Smokeshow/Cloudflare has been flaky lately (#1303)
authorSebastián Ramírez <tiangolo@gmail.com>
Fri, 21 Feb 2025 11:59:48 +0000 (12:59 +0100)
committerGitHub <noreply@github.com>
Fri, 21 Feb 2025 11:59:48 +0000 (12:59 +0100)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
.github/workflows/test.yml
scripts/test.sh

index 9126db93c575cd78430639609ce4e0d00d65f14c..c924e54ef495c5d149de055c57ea5a8a4417459e 100644 (file)
@@ -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
index ff4b114b186342c2380e790aa54ac24eb506b217..826ae903d59039bb16b6eedb3fba746aa19c898c 100755 (executable)
@@ -7,3 +7,4 @@ coverage run -m pytest tests
 coverage combine
 coverage report
 coverage html
+coverage xml