From 8f7c5be4a2bcbefa4560ca934a2fee97e120efdc Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 14 Dec 2023 12:26:53 -0500 Subject: [PATCH 1/2] build: update actions/upload-artifact and actions/download-artifact --- .../templates/python_library/.github/workflows/unittest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml b/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml index 29ec8b6ae..f53fc1f4a 100644 --- a/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml +++ b/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml @@ -26,7 +26,7 @@ jobs: run: | nox -s unit-${{ '{{' }} matrix.python {{ '}}' }} - name: Upload coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-artifacts path: .coverage-${{ '{{' }} matrix.python {{ '}}' }} @@ -47,7 +47,7 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install coverage - name: Download coverage results - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: coverage-artifacts path: .coverage-results/ From 6fda825470910c3bc3889ebec2d3d9383df625a7 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 14 Dec 2023 16:56:00 -0500 Subject: [PATCH 2/2] cater for breaking changes in v4 --- .../templates/python_library/.github/workflows/unittest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml b/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml index f53fc1f4a..bb2871dde 100644 --- a/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml +++ b/synthtool/gcp/templates/python_library/.github/workflows/unittest.yml @@ -28,7 +28,7 @@ jobs: - name: Upload coverage results uses: actions/upload-artifact@v4 with: - name: coverage-artifacts + name: coverage-artifact-${{ '{{' }} matrix.python {{ '}}' }} path: .coverage-${{ '{{' }} matrix.python {{ '}}' }} cover: @@ -49,9 +49,9 @@ jobs: - name: Download coverage results uses: actions/download-artifact@v4 with: - name: coverage-artifacts path: .coverage-results/ - name: Report coverage results run: | - coverage combine .coverage-results/.coverage* + find .coverage-results -type f -name '*.zip' -exec unzip {} \; + coverage combine .coverage-results/**/.coverage* coverage report --show-missing --fail-under={{ cov_level if cov_level != None else 100 }}