From 36ef18d2c8390b531a96d99f87a15b59b7af156d Mon Sep 17 00:00:00 2001 From: Simon Brunning Date: Fri, 13 Sep 2024 07:26:07 +0100 Subject: [PATCH] Fix coverage data upload & download (#252) * Try to fix coverage data upload not working by including hidden files. Also update all github actions to see if that helps. * Merge coverage data. * Don't merge coverage data - just download them all. --- .github/workflows/main.yml | 29 ++++++++++++++++------------- .github/workflows/release.yml | 6 +++--- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aebce48..38eacd3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,11 +35,11 @@ jobs: python-version: pypy3 steps: - - uses: "actions/checkout@v3" + - uses: actions/checkout@v4 with: # We want our tags here fetch-depth: 0 - - uses: "actions/setup-python@v4" + - uses: actions/setup-python@v5 with: python-version: "${{ matrix.python-version }}" - name: "Install dependencies" @@ -53,19 +53,21 @@ jobs: run: "python -m tox" - name: Upload coverage data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: coverage-data - path: ".coverage.*" + name: coverage-data-${{ matrix.python-version }}-${{ matrix.os }} + path: ".coverage*" if-no-files-found: ignore + include-hidden-files: true + coverage: needs: - tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" @@ -73,9 +75,10 @@ jobs: run: python -m pip install --upgrade coverage[toml] - name: Download coverage data - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: coverage-data + pattern: coverage-data-* + merge-multiple: true - name: Combine coverage run: python -m coverage combine @@ -85,7 +88,7 @@ jobs: run: python -m coverage html --skip-covered --skip-empty --ignore-errors - name: Upload the HTML report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: html-report path: htmlcov @@ -99,7 +102,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v3" + - uses: actions/checkout@v4 with: # We want our tags here fetch-depth: 0 @@ -114,8 +117,8 @@ jobs: runs-on: "${{ matrix.os }}" steps: - - uses: "actions/checkout@v3" - - uses: "actions/setup-python@v4" + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" - name: "Install in dev mode" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b211d3..ed5a53b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # Fetch all tags; this is needed for hatch-vcs fetch-depth: 0 @@ -43,7 +43,7 @@ jobs: steps: - name: Download packages built by build-and-inspect-python-package - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Packages path: dist @@ -64,7 +64,7 @@ jobs: (github.event_name == 'workflow_dispatch' && startsWith(github.event.ref, 'refs/tags')) steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Packages path: dist