Skip to content

Commit

Permalink
Fix coverage data upload & download (#252)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
brunns authored Sep 13, 2024
1 parent 1721081 commit 36ef18d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -53,29 +53,32 @@ 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"

- name: Install coverage
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 36ef18d

Please sign in to comment.