Skip to content

Commit

Permalink
enable downloads cicd tests
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Nov 10, 2023
1 parent a47573a commit da31a83
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@ jobs:
- staticcheck
- build-containerlab

download-tests:
uses: ./.github/workflows/download-tests.yml
needs:
- unit-test
- staticcheck
- build-containerlab

# a job that downloads coverage artifact and uses codecov to upload it
coverage:
runs-on: ubuntu-22.04
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/download-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: vxlan-test

"on":
workflow_call:

jobs:
vxlan-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- "docker"
test-suite:
- "*.robot"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/download-artifact@v3
with:
name: containerlab

- name: Move containerlab to usr/bin
run: sudo mv ./containerlab /usr/bin/containerlab && sudo chmod a+x /usr/bin/containerlab

- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: "tests/requirements.txt"

- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/09-download/${{ matrix.test-suite }}
# upload test reports as a zip file
- uses: actions/upload-artifact@v3
if: always()
with:
name: 08-${{ matrix.runtime }}-vxlan-log
path: ./tests/out/*.html

# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: /tmp/clab-tests/coverage/*
retention-days: 7

0 comments on commit da31a83

Please sign in to comment.