Bump github.com/sigstore/sigstore from 1.8.12 to 1.10.4 #35
Workflow file for this run
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: Pull Request Tests | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests-go: | |
| name: API + containerlab tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Ensure runner workspace env (act compatibility) | |
| if: env.RUNNER_WORKSPACE == '' | |
| run: echo "RUNNER_WORKSPACE=${GITHUB_WORKSPACE}/.runner-workspace" >> "$GITHUB_ENV" | |
| - name: Generate tests_go/.env | |
| run: | | |
| if [ ! -f tests_go/.env ]; then | |
| cp tests_go/.env.example tests_go/.env | |
| fi | |
| - name: Generate root .env | |
| run: | | |
| if [ ! -f .env ]; then | |
| cp .env.example .env | |
| fi | |
| - name: Set up Go | |
| uses: WillAbides/setup-go-faster@v1.14.0 | |
| with: | |
| go-version: '1.24.x' | |
| - name: Cache Go modules | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install go-task | |
| run: | | |
| curl -sSL https://taskfile.dev/install.sh | sudo sh -s -- -b /usr/local/bin | |
| task --version | |
| - name: Install Go test tooling | |
| run: | | |
| go install gotest.tools/gotestsum@latest | |
| go install github.com/FloSch62/go-test2html@latest | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends libpam0g-dev curl | |
| - name: Install containerlab | |
| run: | | |
| curl -fsSL https://get.containerlab.dev | sudo -E bash | |
| containerlab version | |
| - name: Containerlab CLI smoke test | |
| run: | | |
| cat <<'EOF' >/tmp/pr-smoke.clab.yml | |
| name: pr-smoke | |
| topology: | |
| nodes: | |
| srl1: | |
| kind: linux | |
| image: ghcr.io/srl-labs/network-multitool:latest | |
| srl2: | |
| kind: linux | |
| image: ghcr.io/srl-labs/network-multitool:latest | |
| links: | |
| - endpoints: ["srl1:eth1", "srl2:eth1"] | |
| EOF | |
| sudo containerlab deploy \ | |
| --network act-pr-smoke \ | |
| --ipv4-subnet 172.31.20.0/24 \ | |
| --ipv6-subnet 2001:db8:ac:20::/64 \ | |
| -t /tmp/pr-smoke.clab.yml | |
| sudo containerlab inspect -t /tmp/pr-smoke.clab.yml | |
| sudo containerlab destroy -t /tmp/pr-smoke.clab.yml --cleanup --yes | |
| - name: Prepare Linux users for tests_go | |
| run: sudo scripts/setup-tests-go-env.sh | |
| - name: Build API server | |
| env: | |
| CGO_ENABLED: 1 | |
| run: | | |
| go build -trimpath -o dist/clab-api-server ./cmd/server | |
| - name: Start API server | |
| run: | | |
| sudo bash -c "cd '$PWD' && env API_SERVER_HOST=127.0.0.1 ./dist/clab-api-server -env-file .env > server.log 2>&1 & echo \$! > server.pid" | |
| sudo chown "$USER:$USER" server.log server.pid | |
| sleep 5 | |
| - name: Wait for API readiness | |
| run: timeout 60 bash -c 'until curl -fsS http://127.0.0.1:8080/health >/dev/null; do sleep 2; done' | |
| - name: Run Task tests | |
| env: | |
| GOTEST_LOG_LEVEL: debug | |
| run: task test | |
| - name: Stop API server | |
| if: always() | |
| run: | | |
| if [ -f server.pid ]; then | |
| sudo kill "$(cat server.pid)" || true | |
| fi | |
| - name: Dump API server logs | |
| if: always() | |
| run: | | |
| if [ -f server.log ]; then | |
| cat server.log | |
| fi | |
| - name: Upload HTML test report | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: go-test-report | |
| path: test-reports/test-report.html | |
| if-no-files-found: warn | |
| - name: Cleanup leftover labs | |
| if: always() | |
| run: | | |
| sudo containerlab destroy --all --cleanup --yes || true |