|
48 | 48 | concurrency: |
49 | 49 | group: run-unit-tests-${{ github.head_ref || github.ref_name }} |
50 | 50 | cancel-in-progress: true |
51 | | - needs: |
52 | | - - lint |
53 | | - - code-format-check |
| 51 | + # needs: |
| 52 | + # - lint |
| 53 | + # - code-format-check |
54 | 54 | runs-on: ubuntu-latest |
55 | 55 | outputs: |
56 | 56 | result: ${{ steps.run-unit-tests.outputs.result }} |
@@ -87,108 +87,106 @@ jobs: |
87 | 87 | if-no-files-found: error |
88 | 88 | - name: echo-tests-log-url |
89 | 89 | run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}' |
90 | | - # run-e2e-tests: |
91 | | - # concurrency: |
92 | | - # group: run-e2e-tests-${{ github.head_ref || github.ref_name }} |
93 | | - # cancel-in-progress: true |
94 | | - # needs: |
95 | | - # - smart-checkout |
96 | | - # - lint |
97 | | - # - code-format-check |
98 | | - # - run-unit-tests |
99 | | - # runs-on: ubuntu-latest |
100 | | - # outputs: |
101 | | - # result: ${{ steps.run-e2e-tests.outputs.result }} |
102 | | - # steps: |
103 | | - # - name: set-env-vars |
104 | | - # run: | |
105 | | - # echo "HOME=/actions-runner" >> $GITHUB_ENV |
106 | | - # - name: setup-go |
107 | | - # uses: actions/setup-go@v3 |
108 | | - # with: |
109 | | - # go-version: '1.20' |
110 | | - # - name: install-dependencies |
111 | | - # run: | |
112 | | - # sudo apt-get update |
113 | | - # sudo apt-get install -y build-essential |
| 90 | + run-e2e-tests: |
| 91 | + concurrency: |
| 92 | + group: run-e2e-tests-${{ github.head_ref || github.ref_name }} |
| 93 | + cancel-in-progress: true |
| 94 | + needs: |
| 95 | + - lint |
| 96 | + - code-format-check |
| 97 | + - run-unit-tests |
| 98 | + runs-on: ubuntu-latest |
| 99 | + outputs: |
| 100 | + result: ${{ steps.run-e2e-tests.outputs.result }} |
| 101 | + steps: |
| 102 | + - name: checkout |
| 103 | + uses: actions/checkout@v3 |
| 104 | + - name: setup-go |
| 105 | + uses: actions/setup-go@v3 |
| 106 | + with: |
| 107 | + go-version: '1.20' |
| 108 | + - name: install-dependencies |
| 109 | + run: | |
| 110 | + sudo apt-get update |
| 111 | + sudo apt-get install -y build-essential |
| 112 | +
|
| 113 | + go install sigs.k8s.io/[email protected] |
114 | 114 |
|
115 | | - # go install sigs.k8s.io/[email protected] |
| 115 | + curl -LO https://dl.k8s.io/release/v1.25.3/bin/linux/amd64/kubectl |
| 116 | + chmod +x ./kubectl |
116 | 117 |
|
117 | | - # curl -LO https://dl.k8s.io/release/v1.25.3/bin/linux/amd64/kubectl |
118 | | - # chmod +x ./kubectl |
| 118 | + HELM_PKG="helm-v3.13.3-linux-amd64.tar.gz" |
| 119 | + curl -LO https://get.helm.sh/"${HELM_PKG}" |
| 120 | + tar -zxvf "${HELM_PKG}" |
| 121 | + mv ./linux-amd64/helm . |
119 | 122 |
|
120 | | - # HELM_PKG="helm-v3.13.3-linux-amd64.tar.gz" |
121 | | - # curl -LO https://get.helm.sh/"${HELM_PKG}" |
122 | | - # tar -zxvf "${HELM_PKG}" |
123 | | - # mv ./linux-amd64/helm . |
| 123 | + curl -sSL https://storage.yandexcloud.net/yandexcloud-ydb/install.sh | bash |
124 | 124 |
|
125 | | - # curl -sSL https://storage.yandexcloud.net/yandexcloud-ydb/install.sh | bash |
| 125 | + echo "$(pwd)" >> $GITHUB_PATH |
| 126 | + echo "$HOME/ydb/bin" >> $GITHUB_PATH |
| 127 | + echo "$HOME/go/bin" >> $GITHUB_PATH |
| 128 | + - name: check-dependencies |
| 129 | + run: | |
| 130 | + gcc --version |
| 131 | + go version |
| 132 | + kind version |
| 133 | + kubectl version --client=true |
| 134 | + helm version |
| 135 | + - name: setup-k8s-cluster |
| 136 | + run: | |
| 137 | + kind delete cluster |
| 138 | + kind create cluster \ |
| 139 | + --image=kindest/node:v1.25.3@sha256:cd248d1438192f7814fbca8fede13cfe5b9918746dfa12583976158a834fd5c5 \ |
| 140 | + --config=./e2e/kind-cluster-config.yaml |
| 141 | + kubectl wait --timeout=5m --for=condition=ready node -l worker=true |
126 | 142 |
|
127 | | - # echo "$(pwd)" >> $GITHUB_PATH |
128 | | - # echo "$HOME/ydb/bin" >> $GITHUB_PATH |
129 | | - # echo "$HOME/go/bin" >> $GITHUB_PATH |
130 | | - # - name: configure-system |
131 | | - # run: | |
132 | | - # sudo sysctl fs.inotify.max_user_instances=1280 |
133 | | - # sudo sysctl fs.inotify.max_user_watches=655360 |
134 | | - # - name: check-dependencies |
135 | | - # run: | |
136 | | - # gcc --version |
137 | | - # go version |
138 | | - # kind version |
139 | | - # kubectl version --client=true |
140 | | - # helm version |
141 | | - # - name: setup-k8s-cluster |
142 | | - # run: | |
143 | | - # kind delete cluster |
144 | | - # kind create cluster \ |
145 | | - # --image=kindest/node:v1.25.3@sha256:cd248d1438192f7814fbca8fede13cfe5b9918746dfa12583976158a834fd5c5 \ |
146 | | - # --config=./e2e/kind-cluster-config.yaml |
147 | | - # kubectl wait --timeout=5m --for=condition=ready node -l worker=true |
148 | | - # - name: build-operator-image |
149 | | - # uses: docker/build-push-action@v3 |
150 | | - # with: |
151 | | - # context: . |
152 | | - # push: false |
153 | | - # # Get commit short sha within Github action workflow |
154 | | - # # Just a random string name, we aren't uploading anyway |
155 | | - # tags: kind/ydb-operator:current |
156 | | - # - name: load-and-deploy-operator |
157 | | - # run: | |
158 | | - # kind load docker-image kind/ydb-operator:current |
159 | | - # - name: pull-and-load-kube-webhook-certgen-image |
160 | | - # uses: nick-fields/retry@v3 |
161 | | - # with: |
162 | | - # timeout_minutes: 5 |
163 | | - # retry_wait_seconds: 20 |
164 | | - # max_attempts: 3 |
165 | | - # command: | |
166 | | - # docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0 |
167 | | - # kind load docker-image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0 |
168 | | - # - name: pull-and-load-ydb-image |
169 | | - # run: | |
170 | | - # # TODO would be cool to parse YDB image from manifests to avoid duplicating information |
171 | | - # docker pull cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.17 |
172 | | - # kind load docker-image cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.17 |
173 | | - # - name: setup-gotestsum |
174 | | - # run: | |
175 | | - # go install gotest.tools/[email protected] |
176 | | - # - name: run-e2e-tests |
177 | | - # id: run-e2e-tests |
178 | | - # run: | |
179 | | - # gotestsum --format pkgname --jsonfile log.json -- -v -timeout 3600s -p 1 ./e2e/... -ginkgo.vv |
180 | | - # - name: convert-to-human-readable |
181 | | - # run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true |
182 | | - # - name: artifact-upload-step |
183 | | - # uses: actions/upload-artifact@v4 |
184 | | - # id: artifact-upload-step |
185 | | - # if: always() |
186 | | - # with: |
187 | | - # name: e2e-tests-log |
188 | | - # path: log.txt |
189 | | - # if-no-files-found: error |
190 | | - # - name: echo-tests-log-url |
191 | | - # run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}' |
192 | | - # - name: teardown-k8s-cluster |
193 | | - # run: | |
194 | | - # kind delete cluster |
| 143 | + kubectl label --overwrite node kind-worker topology.kubernetes.io/zone=fakeZone1 |
| 144 | + kubectl label --overwrite node kind-worker2 topology.kubernetes.io/zone=fakeZone2 |
| 145 | + kubectl label --overwrite node kind-worker3 topology.kubernetes.io/zone=fakeZone3 |
| 146 | + - name: build-operator-image |
| 147 | + uses: docker/build-push-action@v3 |
| 148 | + with: |
| 149 | + context: . |
| 150 | + push: false |
| 151 | + # Get commit short sha within Github action workflow |
| 152 | + # Just a random string name, we aren't uploading anyway |
| 153 | + tags: kind/ydb-operator:current |
| 154 | + - name: load-and-deploy-operator |
| 155 | + run: | |
| 156 | + kind load docker-image kind/ydb-operator:current |
| 157 | + - name: pull-and-load-kube-webhook-certgen-image |
| 158 | + uses: nick-fields/retry@v3 |
| 159 | + with: |
| 160 | + timeout_minutes: 5 |
| 161 | + retry_wait_seconds: 20 |
| 162 | + max_attempts: 3 |
| 163 | + command: | |
| 164 | + docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0 |
| 165 | + kind load docker-image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0 |
| 166 | + - name: pull-and-load-ydb-image |
| 167 | + run: | |
| 168 | + # TODO would be cool to parse YDB image from manifests to avoid duplicating information |
| 169 | + docker pull cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.17 |
| 170 | + kind load docker-image cr.yandex/crptqonuodf51kdj7a7d/ydb:23.3.17 |
| 171 | + - name: setup-gotestsum |
| 172 | + run: | |
| 173 | + go install gotest.tools/[email protected] |
| 174 | + - name: run-e2e-tests |
| 175 | + id: run-e2e-tests |
| 176 | + run: | |
| 177 | + gotestsum --format pkgname --jsonfile log.json -- -v -timeout 3600s -p 1 ./e2e/... -ginkgo.vv |
| 178 | + - name: convert-to-human-readable |
| 179 | + run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true |
| 180 | + - name: artifact-upload-step |
| 181 | + uses: actions/upload-artifact@v4 |
| 182 | + id: artifact-upload-step |
| 183 | + if: always() |
| 184 | + with: |
| 185 | + name: e2e-tests-log |
| 186 | + path: log.txt |
| 187 | + if-no-files-found: error |
| 188 | + - name: echo-tests-log-url |
| 189 | + run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}' |
| 190 | + - name: teardown-k8s-cluster |
| 191 | + run: | |
| 192 | + kind delete cluster |
0 commit comments