Skip to content

feat: Add support for target cluster from a kubeconfig #26

feat: Add support for target cluster from a kubeconfig

feat: Add support for target cluster from a kubeconfig #26

Workflow file for this run

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 ./...