netclab #118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: netclab | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| deploy-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install kubectl | |
| run: | | |
| [ $(uname -m) = x86_64 ] && export os="linux/amd64" | |
| [ $(uname -m) = aarch64 ] && export os="darwin/arm64" | |
| curl -LO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/$os/kubectl" | |
| chmod +x ./kubectl | |
| sudo mv ./kubectl /usr/local/bin/kubectl | |
| - name: Install kind | |
| run: | | |
| version=$(basename $(curl -s -w %{redirect_url} https://github.com/kubernetes-sigs/kind/releases/latest)) | |
| [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/${version}/kind-linux-amd64 | |
| [ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/${version}/kind-linux-arm64 | |
| chmod +x ./kind | |
| sudo mv ./kind /usr/local/bin/kind | |
| - name: Install netclab | |
| run: bash <(curl -Ls "https://raw.githubusercontent.com/mbakalarski/netclab/main/netclab-kind.sh") nokubevirt | |
| - name: Install bats | |
| run: sudo apt-get -y update && sudo apt-get -y install bats | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Run tests | |
| run: | | |
| ROUTER="srl01" bats -t examples/srlinux/tests/one.bats |