Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Lamarre <[email protected]>
  • Loading branch information
alexandreLamarre committed Jul 31, 2024
1 parent 0178c6d commit 1db496e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 35 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/ci.yaml

This file was deleted.

13 changes: 3 additions & 10 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CLUSTER_NAME : test-cluster
K3S_VERSION : v1.27.9-k3s1
K3S_VERSION : v1.30.2-k3s1

jobs:
build:
Expand All @@ -27,17 +27,10 @@ jobs:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- name: Set up k3d
run : ./.github/workflows/scripts/install-k3d.sh
- name: build
run: 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
- name : make CI
run: |
k3d kubeconfig get ${{ env.CLUSTER_NAME }} > kubeconfig.yaml
export KUBECONFIG=$(pwd)/kubeconfig.yaml
cd tests && KUBECONFIG=$KUBECONFIG go test -v -race -timeout 30m ./...
KUBECONFIG=$KUBECONFIG make ci
2 changes: 2 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e

echo "Building helm-locker"

source $(dirname $0)/version

cd $(dirname $0)/..
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
cd $(dirname $0)/..

echo Running tests
go test -cover -tags=test ./...
KUBECONFIG=$KUBECONFIG go test -race -cover -timeout 10m ./...
2 changes: 1 addition & 1 deletion tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var _ = Describe("E2E helm locker operator tests", Ordered, Label("integration")
Expect(crd.Create(testCtx, cfg)).To(Succeed())
go func() {
if err := controllers.Register(testCtx, ns, "helm-locker", "node1", clientCmdCfg); err != nil {
Fail(fmt.Sprintf("Failed to register controllers %s", err))
GinkgoWriter.Write([]byte(fmt.Sprintf("Failed to register controllers: %s", err)))
}
}()
})
Expand Down

0 comments on commit 1db496e

Please sign in to comment.