Repo restructure project - Merge helm-locker into local #16
This file contains 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: "[helm-locker] CI-e2e" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
CLUSTER_NAME : test-cluster | |
K3S_VERSION : v1.27.9-k3s1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name : Set up Go | |
uses : actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name : Setup up kubectl | |
run : | | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
- name: Set up k3d | |
run : ./.github/workflows/e2e/scripts/install-k3d.sh | |
- name: build | |
run: BUILD_TARGET=helm-locker make build | |
- name : Setup cluster | |
run : CLUSTER_NAME=${{ env.CLUSTER_NAME }} K3S_VERSION=${{ env.K3S_VERSION }} ./scripts/setup-cluster.sh | |
# temporary hack to run the helm-locker controller in the k3d cluster | |
- name : run helm-locker | |
run : | | |
kubectl create ns cattle-helm-system | |
./bin/helm-locker & | |
- name : run e2e tests | |
run: | | |
k3d kubeconfig get ${{ env.CLUSTER_NAME }} > kubeconfig.yaml | |
export KUBECONFIG=$(pwd)/kubeconfig.yaml | |
cd tests && KUBECONFIG=$KUBECONFIG go test -v -race -timeout 30m ./... |