From 5b50ade59a433778084bedb129d34f440103c6a3 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 2 Sep 2024 15:36:02 +0100 Subject: [PATCH] Use a non-hidden filename for coverage files 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 https://github.com/actions/upload-artifact/issues/602 and https://hypothes-is.slack.com/archives/C4K6M7P5E/p1725285976308269. --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a244d13b17a..f7cfe1bd895 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: