From 908fb7f4c01c841651d67ce6ed9afc82ad837ebf Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Mon, 18 Dec 2023 13:19:36 +0200 Subject: [PATCH] refactor upload/download artifacts for v4 --- .github/workflows/cicd.yml | 42 +++++++++++++++++++------------ .github/workflows/vxlan-tests.yml | 5 ++-- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e4dfaa2ac..b85518c2e 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -82,10 +82,12 @@ jobs: - name: Build containerlab run: make build-with-podman-debug BINARY=containerlab # store clab binary as artifact - - uses: actions/upload-artifact@v4 + - name: Upload containerlab binary + uses: actions/upload-artifact@v4 with: name: containerlab path: containerlab + compression-level: 0 staticcheck: runs-on: ubuntu-22.04 @@ -129,10 +131,11 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: Upload coverage + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-unit-test path: /tmp/clab-tests/coverage/* retention-days: 7 @@ -178,7 +181,8 @@ jobs: run: | bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/01-smoke # upload test reports as a zip file - - uses: actions/upload-artifact@v4 + - name: Upload test report + uses: actions/upload-artifact@v4 if: always() with: name: 01-smoke-log @@ -186,10 +190,11 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: Upload coverage + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-smoke-tests path: /tmp/clab-tests/coverage/* retention-days: 7 @@ -231,7 +236,8 @@ jobs: run: | bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/06-ext-container # upload test reports as a zip file - - uses: actions/upload-artifact@v4 + - name: Upload test reports + uses: actions/upload-artifact@v4 if: always() with: name: 06-ext-container-log @@ -239,10 +245,11 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: upload coverage reports + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-ext-container-test path: /tmp/clab-tests/coverage/* retention-days: 7 @@ -294,10 +301,11 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: Upload coverage + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-ceos-tests path: /tmp/clab-tests/coverage/* retention-days: 7 @@ -355,10 +363,11 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: Upload coverage + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-srlinux-tests path: /tmp/clab-tests/coverage/* retention-days: 7 @@ -402,10 +411,11 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: Upload coverage + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-ixiac-one-tests path: /tmp/clab-tests/coverage/* retention-days: 7 @@ -437,7 +447,7 @@ jobs: go-version: ${{ env.GOVER }} - uses: actions/download-artifact@v4 with: - name: coverage + name: coverage* path: /tmp/clab-tests/coverage - name: convert Go's binary coverage to text coverage run: make convert-coverage diff --git a/.github/workflows/vxlan-tests.yml b/.github/workflows/vxlan-tests.yml index bc03e40e9..97883e717 100644 --- a/.github/workflows/vxlan-tests.yml +++ b/.github/workflows/vxlan-tests.yml @@ -57,9 +57,10 @@ jobs: # upload coverage report from unit tests, as they are then # merged with e2e tests coverage - - uses: actions/upload-artifact@v4 + - name: Upload coverage report + uses: actions/upload-artifact@v4 if: always() with: - name: coverage + name: coverage-vxlan-tests path: /tmp/clab-tests/coverage/* retention-days: 7