Skip to content

Commit

Permalink
Use a non-hidden filename for coverage files
Browse files Browse the repository at this point in the history
The `upload-artifact` action recently introduced a change where by default it no
longer uploads hidden files. This affected the `.coverage.*` files produced by
Python tests. There is an `include-hidden-files: true` option to change this,
but so far in our testing it did not work. Fix the issue by changing the file
name to be non-hidden.

See actions/upload-artifact#602 and
https://hypothes-is.slack.com/archives/C4K6M7P5E/p1725285976308269.
  • Loading branch information
robertknight committed Sep 2, 2024
1 parent 183b088 commit 093db4f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ jobs:
- run: python -m pip install 'tox<4'
- run: tox -e tests
env:
COVERAGE_FILE: .coverage.${{ matrix.python-version }}
# Use a non-hidden file name to work around issues uploading hidden
# files in `actions/upload-artifact`.
COVERAGE_FILE: coverage.tests
- name: Upload coverage file
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage.*
path: coverage.tests
Coverage:
needs: tests
runs-on: ubuntu-latest
Expand All @@ -123,6 +125,10 @@ jobs:
name: coverage
- run: python -m pip install 'tox<4'
- run: tox -e coverage
env:
# nb. In this context `COVERAGE_FILE` specifies a basename. All files
# matching `coverage.{name}` will be combined.
COVERAGE_FILE: coverage
Functests:
runs-on: ubuntu-latest
services:
Expand Down

0 comments on commit 093db4f

Please sign in to comment.