Skip to content

Commit

Permalink
refactor upload/download artifacts for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Dec 18, 2023
1 parent 0eee1e3 commit 908fb7f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
42 changes: 26 additions & 16 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -178,18 +181,20 @@ 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
path: ./tests/out/*.html

# 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

Expand Down Expand Up @@ -231,18 +236,20 @@ 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
path: ./tests/out/*.html

# 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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/vxlan-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 908fb7f

Please sign in to comment.