|
1 | 1 | name: Admission Webhook Tests |
| 2 | + |
2 | 3 | on: [push, pull_request, workflow_dispatch] |
3 | 4 |
|
4 | 5 | jobs: |
|
8 | 9 | concurrency: |
9 | 10 | group: ${{ github.workflow }}-${{ github.ref }} |
10 | 11 | cancel-in-progress: true |
| 12 | + |
11 | 13 | steps: |
12 | 14 | - name: Checkout noobaa-operator |
13 | 15 | uses: actions/checkout@v4 |
14 | 16 | with: |
15 | 17 | repository: "noobaa/noobaa-operator" |
16 | 18 | path: "noobaa-operator" |
17 | 19 |
|
18 | | - - name: Setup Go on runner |
| 20 | + - name: Setup Go |
19 | 21 | uses: actions/setup-go@v5 |
20 | 22 | with: |
21 | 23 | go-version: "1.23" |
22 | 24 |
|
23 | 25 | - name: Set environment variables |
24 | 26 | run: | |
25 | | - echo PATH=$PATH:$HOME/go/bin >> $GITHUB_ENV |
26 | | - echo OPERATOR_IMAGE=noobaa/noobaa-operator:integration >> $GITHUB_ENV |
27 | | - echo CHANGE_MINIKUBE_NONE_USER=true >> $GITHUB_ENV |
| 27 | + echo "PATH=$PATH:$HOME/go/bin" >> $GITHUB_ENV |
| 28 | + echo "OPERATOR_IMAGE=noobaa/noobaa-operator:integration" >> $GITHUB_ENV |
28 | 29 |
|
29 | | - - name: Deploy dependencies |
30 | | - run: | |
31 | | - set -x |
32 | | - cd ./noobaa-operator |
33 | | - sudo bash .travis/install-minikube.sh |
34 | | - go get -v github.com/onsi/ginkgo/v2 |
35 | | - go install -v github.com/onsi/ginkgo/v2/ginkgo |
36 | | - ginkgo version |
| 30 | + - name: Setup Minikube |
| 31 | + uses: medyagh/setup-minikube@v0.0.14 |
| 32 | + with: |
| 33 | + driver: docker |
| 34 | + kubernetes-version: v1.29.0 |
| 35 | + |
| 36 | + - name: Verify Minikube is running |
| 37 | + run: minikube status |
37 | 38 |
|
38 | | - - name: Change settings for k8s and minikube |
| 39 | + - name: Setup Ginkgo |
39 | 40 | run: | |
40 | | - sudo mv /root/.kube /root/.minikube $HOME |
41 | | - sudo chown -R $USER $HOME/.kube $HOME/.minikube |
42 | | - sed "s/root/home\/$USER/g" $HOME/.kube/config > tmp; mv tmp $HOME/.kube/config |
| 41 | + go install github.com/onsi/ginkgo/v2/ginkgo@latest |
| 42 | + ginkgo version |
43 | 43 |
|
44 | 44 | - name: Build operator image |
45 | 45 | run: | |
46 | 46 | set -x |
47 | 47 | cd ./noobaa-operator |
48 | 48 | make cli |
49 | 49 | make image |
50 | | - sudo docker tag noobaa/noobaa-operator:$(go run cmd/version/main.go) $OPERATOR_IMAGE |
| 50 | + docker tag noobaa/noobaa-operator:$(go run cmd/version/main.go) $OPERATOR_IMAGE |
| 51 | + minikube image load $OPERATOR_IMAGE |
51 | 52 |
|
52 | 53 | - name: Install noobaa system |
53 | 54 | run: | |
|
88 | 89 | with: |
89 | 90 | name: admission-tests-logs |
90 | 91 | path: noobaa-operator/admission-tests-logs |
91 | | - |
92 | | - # Uncomment this step in case where you want to connect to the VM of this workflow using SSH. |
93 | | - # Pay attention that this workflow was configured with a timeout, and you might change it for this step. |
94 | | - # - name: Setup tmate session |
95 | | - # if: ${{ failure() }} |
96 | | - # uses: mxschmitt/action-tmate@v3 |
0 commit comments