From ff020636032c6783a6840463f77ebf4335ada8b2 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Tue, 10 Sep 2024 11:39:34 +0200 Subject: [PATCH 1/3] Migrate to artifact-upload and artifact-download v4 --- .github/actions/build-distribution/action.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/run-matrix.yml | 8 ++++---- .github/workflows/test-docs.yml | 4 ++-- .github/workflows/test.yml | 13 +++++++------ 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/actions/build-distribution/action.yml b/.github/actions/build-distribution/action.yml index 05c32eeb8..bc0d55c29 100644 --- a/.github/actions/build-distribution/action.yml +++ b/.github/actions/build-distribution/action.yml @@ -14,7 +14,7 @@ runs: run: ./dev-utils/make-distribution.sh shell: bash - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: build-distribution path: ./build/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fef1933b..8fcd8e775 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: build-distribution path: ./build @@ -128,7 +128,7 @@ jobs: username: ${{ secrets.ELASTIC_DOCKER_USERNAME }} password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: build-distribution path: ./build diff --git a/.github/workflows/run-matrix.yml b/.github/workflows/run-matrix.yml index 053d557a0..0b31f4318 100644 --- a/.github/workflows/run-matrix.yml +++ b/.github/workflows/run-matrix.yml @@ -28,14 +28,14 @@ jobs: LOCALSTACK_VOLUME_DIR: localstack_data - if: success() || failure() name: Upload JUnit Test Results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-results + name: test-results-${{ matrix.framework }}-${{ matrix.version }} path: "**/*-python-agent-junit.xml" - if: success() || failure() name: Upload Coverage Reports - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: coverage-reports + name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }} path: "**/.coverage*" include-hidden-files: true diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index 86b24cc0c..e1c4c4ae4 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -36,7 +36,7 @@ jobs: ENDOFFILE - if: success() || failure() name: Upload JUnit Test Results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-results + name: test-results-docs path: "docs-python-agent-junit.xml" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99b195670..13e7c868c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -145,15 +145,15 @@ jobs: run: .\scripts\run-tests.bat - if: success() || failure() name: Upload JUnit Test Results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-results + name: test-results-${{ matrix.framework }}-${{ matrix.version }} path: "**/*-python-agent-junit.xml" - if: success() || failure() name: Upload Coverage Reports - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: coverage-reports + name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }} path: "**/.coverage*" # This job is here to have a single status check that can be set as required. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds @@ -197,9 +197,10 @@ jobs: - run: python -Im pip install --upgrade coverage[toml] - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: coverage-reports + pattern: coverage-reports-* + merge-multiple: true - name: Combine coverage & fail if it's <84%. run: | From 5dedcaf04c791435bebe07fa6b5402ab0c3e0081 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Tue, 10 Sep 2024 11:43:01 +0200 Subject: [PATCH 2/3] Fix artifact names --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13e7c868c..d9b58d4f9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -147,13 +147,13 @@ jobs: name: Upload JUnit Test Results uses: actions/upload-artifact@v4 with: - name: test-results-${{ matrix.framework }}-${{ matrix.version }} + name: test-results-${{ matrix.framework }}-${{ matrix.version }}-asyncio-${{ matrix.asyncio }} path: "**/*-python-agent-junit.xml" - if: success() || failure() name: Upload Coverage Reports uses: actions/upload-artifact@v4 with: - name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }} + name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }}-asyncio-${{ matrix.asyncio }} path: "**/.coverage*" # This job is here to have a single status check that can be set as required. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds From 3e69a3372064bae7deb78a310bb71672a4e5b732 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Tue, 10 Sep 2024 11:49:15 +0200 Subject: [PATCH 3/3] Fix usage of geekyeggo/delete-artifac --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9b58d4f9..62a157118 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -149,12 +149,14 @@ jobs: with: name: test-results-${{ matrix.framework }}-${{ matrix.version }}-asyncio-${{ matrix.asyncio }} path: "**/*-python-agent-junit.xml" + retention-days: 1 - if: success() || failure() name: Upload Coverage Reports uses: actions/upload-artifact@v4 with: name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }}-asyncio-${{ matrix.asyncio }} path: "**/.coverage*" + retention-days: 1 # This job is here to have a single status check that can be set as required. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds # If a run contains a series of jobs that need each other, a failure applies to all jobs in the dependency chain from the point of failure onwards. @@ -218,6 +220,6 @@ jobs: with: name: html-coverage-report path: htmlcov - - uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b + - uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # 5.1.0 with: - name: coverage-reports + name: coverage-reports-*