Repository navigation
feat: add k3d and kind clusters #29
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version: "1.26" | |
| cache: true | |
| - name: go build | |
| run: go build ./... | |
| - name: schema up to date | |
| run: make check-schema | |
| - name: go test | |
| run: go test ./... | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.11.4 | |
| smoke-cli: | |
| name: smoke CLI (testdata chart) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version: "1.26" | |
| cache: true | |
| - name: build vigie | |
| run: go build -o vigie ./cmd/vigie | |
| - name: lint | |
| run: ./vigie lint testdata/charts/basic | |
| - name: validate (baseline) | |
| run: ./vigie validate testdata/charts/basic | |
| - name: test (unit tier) | |
| run: ./vigie test testdata/charts/basic | |
| - name: provision envtest binaries | |
| # setup-envtest is pinned via go.mod (go run resolves that version), so | |
| # the downloaded kube-apiserver/etcd match the controller-runtime we use. | |
| # KUBEBUILDER_ASSETS is honoured first by the envtest backend, so this | |
| # pins the control-plane version for both the CLI and the tagged tests. | |
| run: | | |
| ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest use 1.30 -p path) | |
| echo "resolved envtest assets: $ASSETS" | |
| echo "KUBEBUILDER_ASSETS=$ASSETS" >> "$GITHUB_ENV" | |
| - name: test (apply tier, envtest) | |
| run: ./vigie test testdata/charts/basic --cluster envtest | |
| - name: integration tests (envtest) | |
| run: go test -tags envtest ./... | |
| e2e-cli: | |
| name: e2e CLI (${{ matrix.backend }}) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| backend: [kind, k3d] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version: "1.26" | |
| cache: true | |
| - name: build vigie | |
| run: go build -o vigie ./cmd/vigie | |
| - name: test (e2e, ${{ matrix.backend }}) | |
| # ubuntu runners ship docker; --download-tools fetches the kind/k3d CLI | |
| # into the vigie cache, exercising the resolver's download path end to | |
| # end instead of requiring a preinstalled binary. Non-blocking | |
| # (continue-on-error): node-image pulls and cluster provisioning are | |
| # network-bound and occasionally flaky, and must not gate PRs. | |
| run: ./vigie test testdata/charts/basic --cluster ${{ matrix.backend }} --download-tools |