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 ea1bdd3 commit 5b50ade
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 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,8 @@ jobs:
name: coverage
- run: python -m pip install 'tox<4'
- run: tox -e coverage
env:
COVERAGE_FILE: coverage.tests
Functests:
runs-on: ubuntu-latest
services:
Expand Down

0 comments on commit 5b50ade

Please sign in to comment.