From 67cb628cdba1223fb16d9fbf3054986702a2bc2f Mon Sep 17 00:00:00 2001 From: Elizabeth Sall Date: Mon, 21 Oct 2024 12:18:20 -0700 Subject: [PATCH] Try coverage settings - using coverage.xml --- .github/workflows/prerelease.yml | 4 ++-- .github/workflows/push.yml | 21 ++++++++++++--------- .github/workflows/release.yml | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 0cb5baf3..24426639 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -24,7 +24,7 @@ jobs: - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: python-package-distributions path: dist/ @@ -40,7 +40,7 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-package-distributions path: dist/ diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 00250452..9a9f5694 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -32,7 +32,7 @@ jobs: run: ruff check --output-format=github network_wrangler - name: Run tests with coverage and benchmarking run: | - pytest --junitxml=coverage.xml --benchmark-save=benchmark --benchmark-json=benchmark.json + pytest --junitxml=pytest.xml --cov-report "xml:coverage.xml" --benchmark-save=benchmark --benchmark-json=benchmark.json - name: Build docs run: | mike deploy --push ${{ github.ref_name }} @@ -45,18 +45,21 @@ jobs: with: tool: 'pytest' output-file-path: benchmark.json + alert-threshold: '125%' github-token: ${{ secrets.GITHUB_TOKEN }} comment-on-alert: true summary-always: true + - name: Upload coverage artifacts + uses: actions/upload-artifact@v4 + with: + name: coverage + retention-days: 5 + path: | + coverage.xml - name: Pytest coverage comment if: github.event_name == 'pull_request' uses: MishaKav/pytest-coverage-comment@main with: - junitxml-path: ./coverage.xml - - name: Upload coverage and benchmark artifacts - uses: actions/upload-artifact@v3 - with: - name: coverage-and-benchmark - path: | - coverage.xml - benchmark.json + pytest-xml-coverage-path: coverage.xml + junitxml-path: pytest.xml + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cea96dc1..ad50c9b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: python-package-distributions path: dist/ @@ -41,7 +41,7 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-package-distributions path: dist/