SDK and go version update. (#259) #721
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: CI | |
| # \\ SPIKE: Secure your secrets with SPIFFE. — https://spike.ist/ | |
| # \\\\\ Copyright 2024-present SPIKE contributors. | |
| # \\\\\\\ SPDX-License-Identifier: Apache-2.0 | |
| on: | |
| pull_request: {} | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| go-build: | |
| # This job effectively exists to ensure that the code can still be built | |
| # with the proposed changes. | |
| name: Go - Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| checks: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - run: make build | |
| go-unit-test: | |
| name: Go - Unit Tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| checks: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Unit Tests | |
| # run: go test -race -shuffle=on -coverprofile=coverage.txt ./... | |
| run: make test | |
| go-lint: | |
| name: Go - Lint | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| checks: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Lint Code | |
| run: make audit | |
| integration: | |
| name: Integration Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/[email protected] | |
| with: | |
| version: v3.16.2 | |
| - name: Create kind v1.33.1 cluster | |
| uses: helm/[email protected] | |
| with: | |
| version: v0.29.0 | |
| node_image: kindest/node:v1.33.1 | |
| config: .github/kind/conf/kind-config.yaml | |
| verbosity: 1 | |
| - name: Create kind ${{ matrix.k8s }} cluster | |
| run: | | |
| set -xe | |
| teardown() { | |
| if [ $1 -ne 0 ]; then | |
| kubectl get pods -A | |
| kubectl describe pods -A | |
| fi | |
| } | |
| trap 'EC=$? && trap - SIGTERM && teardown $EC' SIGINT SIGTERM EXIT | |
| make docker-build | |
| docker images | |
| docker tag spike-pilot:dev ghcr.io/spiffe/spike-pilot:dev | |
| docker tag spike-nexus:dev ghcr.io/spiffe/spike-nexus:dev | |
| docker tag spike-keeper:dev ghcr.io/spiffe/spike-keeper:dev | |
| docker tag spike-demo:dev ghcr.io/spiffe/spike-demo:dev | |
| docker tag spike-bootstrap:dev ghcr.io/spiffe/spike-bootstrap:dev | |
| kind load docker-image --name chart-testing ghcr.io/spiffe/spike-pilot:dev | |
| kind load docker-image --name chart-testing ghcr.io/spiffe/spike-nexus:dev | |
| kind load docker-image --name chart-testing ghcr.io/spiffe/spike-keeper:dev | |
| kind load docker-image --name chart-testing ghcr.io/spiffe/spike-demo:dev | |
| kind load docker-image --name chart-testing ghcr.io/spiffe/spike-bootstrap:dev | |
| cd ci/integration/minio-rolearn | |
| ./setup.sh | |
| ./test.sh |