Skip to content

Commit 94abcee

Browse files
committed
wip: enable entire workflow
1 parent e4b5b99 commit 94abcee

File tree

1 file changed

+114
-114
lines changed

1 file changed

+114
-114
lines changed

.github/workflows/run-tests.yml

Lines changed: 114 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -8,121 +8,121 @@ on:
88
# remove CI_RUNNER_DEBUG_SSH_PUBLIC_KEY
99
#
1010
jobs:
11-
# lint:
12-
# concurrency:
13-
# group: lint-golangci-${{ github.head_ref || github.ref_name }}
14-
# cancel-in-progress: true
15-
# runs-on: ubuntu-latest
16-
# steps:
17-
# - name: checkout
18-
# uses: actions/checkout@v3
19-
# - name: setup-go
20-
# uses: actions/setup-go@v3
21-
# with:
22-
# go-version: '1.20'
23-
# - name: golangci-lint
24-
# uses: golangci/golangci-lint-action@v2
25-
# with:
26-
# version: v1.52.2
27-
# code-format-check:
28-
# concurrency:
29-
# group: lint-autoformat-${{ github.head_ref || github.ref_name }}
30-
# cancel-in-progress: true
31-
# runs-on: ubuntu-latest
32-
# steps:
33-
# - name: checkout
34-
# uses: actions/checkout@v3
35-
# - name: setup-go
36-
# uses: actions/setup-go@v3
37-
# with:
38-
# go-version: '1.20'
39-
# - name: Install utilities
40-
# run: |
41-
# go install mvdan.cc/[email protected]
42-
# go install github.com/rinchsan/gosimports/cmd/[email protected]
43-
# - name: format all files with auto-formatter
44-
# run: bash ./.github/scripts/format-all-go-code.sh "$PWD"
45-
# - name: Check repository diff
46-
# run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"
47-
# run-unit-tests:
48-
# concurrency:
49-
# group: run-unit-tests-${{ github.head_ref || github.ref_name }}
50-
# cancel-in-progress: true
51-
# needs:
52-
# - lint
53-
# - code-format-check
54-
# runs-on: ubuntu-latest
55-
# outputs:
56-
# result: ${{ steps.run-unit-tests.outputs.result }}
57-
# steps:
58-
# - name: checkout
59-
# uses: actions/checkout@v3
60-
# - name: setup-go
61-
# uses: actions/setup-go@v3
62-
# with:
63-
# go-version: '1.20'
64-
# - name: setup-medium-test-class-binaries
65-
# run: |
66-
# # This installs kube-apiserver and etcd binaries for `medium`
67-
# # class tests. Refer to the writing tests docs for more info.
68-
# make envtest
69-
# KUBEBUILDER_ASSETS=$(./bin/setup-envtest use 1.26 -p path)
70-
# echo "KUBEBUILDER_ASSETS=$KUBEBUILDER_ASSETS" >> $GITHUB_ENV
71-
# - name: setup-gotestsum
72-
# run: |
73-
# go install gotest.tools/[email protected]
74-
# - name: run-unit-tests
75-
# id: run-unit-tests
76-
# run: |
77-
# gotestsum --format pkgname --jsonfile log.json -- -v -timeout 900s -p 1 ./internal/... -ginkgo.vv -coverprofile cover.out
78-
# - name: convert-to-human-readable
79-
# run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true
80-
# - name: artifact-upload-step
81-
# uses: actions/upload-artifact@v4
82-
# id: artifact-upload-step
83-
# if: always()
84-
# with:
85-
# name: unit-tests-log
86-
# path: log.txt
87-
# if-no-files-found: error
88-
# - name: echo-tests-log-url
89-
# run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
11+
lint:
12+
concurrency:
13+
group: lint-golangci-${{ github.head_ref || github.ref_name }}
14+
cancel-in-progress: true
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: checkout
18+
uses: actions/checkout@v3
19+
- name: setup-go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: '1.20'
23+
- name: golangci-lint
24+
uses: golangci/golangci-lint-action@v2
25+
with:
26+
version: v1.52.2
27+
code-format-check:
28+
concurrency:
29+
group: lint-autoformat-${{ github.head_ref || github.ref_name }}
30+
cancel-in-progress: true
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: checkout
34+
uses: actions/checkout@v3
35+
- name: setup-go
36+
uses: actions/setup-go@v3
37+
with:
38+
go-version: '1.20'
39+
- name: Install utilities
40+
run: |
41+
go install mvdan.cc/[email protected]
42+
go install github.com/rinchsan/gosimports/cmd/[email protected]
43+
- name: format all files with auto-formatter
44+
run: bash ./.github/scripts/format-all-go-code.sh "$PWD"
45+
- name: Check repository diff
46+
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"
47+
run-unit-tests:
48+
concurrency:
49+
group: run-unit-tests-${{ github.head_ref || github.ref_name }}
50+
cancel-in-progress: true
51+
needs:
52+
- lint
53+
- code-format-check
54+
runs-on: ubuntu-latest
55+
outputs:
56+
result: ${{ steps.run-unit-tests.outputs.result }}
57+
steps:
58+
- name: checkout
59+
uses: actions/checkout@v3
60+
- name: setup-go
61+
uses: actions/setup-go@v3
62+
with:
63+
go-version: '1.20'
64+
- name: setup-medium-test-class-binaries
65+
run: |
66+
# This installs kube-apiserver and etcd binaries for `medium`
67+
# class tests. Refer to the writing tests docs for more info.
68+
make envtest
69+
KUBEBUILDER_ASSETS=$(./bin/setup-envtest use 1.26 -p path)
70+
echo "KUBEBUILDER_ASSETS=$KUBEBUILDER_ASSETS" >> $GITHUB_ENV
71+
- name: setup-gotestsum
72+
run: |
73+
go install gotest.tools/[email protected]
74+
- name: run-unit-tests
75+
id: run-unit-tests
76+
run: |
77+
gotestsum --format pkgname --jsonfile log.json -- -v -timeout 900s -p 1 ./internal/... -ginkgo.vv -coverprofile cover.out
78+
- name: convert-to-human-readable
79+
run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true
80+
- name: artifact-upload-step
81+
uses: actions/upload-artifact@v4
82+
id: artifact-upload-step
83+
if: always()
84+
with:
85+
name: unit-tests-log
86+
path: log.txt
87+
if-no-files-found: error
88+
- name: echo-tests-log-url
89+
run: echo 'Unit tests log URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
9090
run-e2e-tests:
9191
concurrency:
9292
group: run-e2e-tests-${{ github.head_ref || github.ref_name }}
9393
cancel-in-progress: true
94-
# needs:
95-
# - lint
96-
# - code-format-check
97-
# - run-unit-tests
94+
needs:
95+
- lint
96+
- code-format-check
97+
- run-unit-tests
9898
runs-on: ubuntu-latest
9999
outputs:
100100
result: ${{ steps.run-e2e-tests.outputs.result }}
101101
steps:
102-
- name: disk-space
103-
run: |
104-
echo "Free space:"
105-
df -h
102+
# - name: disk-space
103+
# run: |
104+
# echo "Free space:"
105+
# df -h
106106
- name: Maximize build space
107107
uses: AdityaGarg8/[email protected]
108108
with:
109109
remove-android: 'true'
110110
remove-haskell: 'true'
111111
remove-codeql: 'true'
112-
- name: disk-space
113-
run: |
114-
echo "Free space:"
115-
df -h
112+
# - name: disk-space
113+
# run: |
114+
# echo "Free space:"
115+
# df -h
116116
- name: checkout
117117
uses: actions/checkout@v3
118118
- name: setup-go
119119
uses: actions/setup-go@v3
120120
with:
121121
go-version: '1.20'
122-
- name: disk-space-setup-go
123-
run: |
124-
echo "Free space:"
125-
df -h
122+
# - name: disk-space-setup-go
123+
# run: |
124+
# echo "Free space:"
125+
# df -h
126126
- name: install-dependencies
127127
run: |
128128
sudo apt-get update
@@ -143,10 +143,10 @@ jobs:
143143
echo "$(pwd)" >> $GITHUB_PATH
144144
echo "$HOME/ydb/bin" >> $GITHUB_PATH
145145
echo "$HOME/go/bin" >> $GITHUB_PATH
146-
- name: disk-space-installing-deps
147-
run: |
148-
echo "Free space:"
149-
df -h
146+
# - name: disk-space-installing-deps
147+
# run: |
148+
# echo "Free space:"
149+
# df -h
150150
- name: check-dependencies
151151
run: |
152152
gcc --version
@@ -176,10 +176,10 @@ jobs:
176176
- name: load-and-deploy-operator
177177
run: |
178178
kind load docker-image kind/ydb-operator:current --nodes kind-worker,kind-worker2,kind-worker3
179-
- name: disk-space-loading-operator
180-
run: |
181-
echo "Free space:"
182-
df -h
179+
# - name: disk-space-loading-operator
180+
# run: |
181+
# echo "Free space:"
182+
# df -h
183183
- name: pull-and-load-kube-webhook-certgen-image
184184
uses: nick-fields/retry@v3
185185
with:
@@ -198,21 +198,21 @@ jobs:
198198
# TODO would be cool to parse YDB image from manifests to avoid duplicating information
199199
docker pull cr.yandex/crptqonuodf51kdj7a7d/ydb:23.2.12
200200
kind load docker-image cr.yandex/crptqonuodf51kdj7a7d/ydb:23.2.12 --nodes kind-worker,kind-worker2,kind-worker3
201-
- name: disk-space-loading-ydb
202-
run: |
203-
echo "Free space:"
204-
df -h
201+
# - name: disk-space-loading-ydb
202+
# run: |
203+
# echo "Free space:"
204+
# df -h
205205
- name: setup-gotestsum
206206
run: |
207207
go install gotest.tools/[email protected]
208-
- name: run-tests
209-
run: |
210-
go test -v -timeout 3600s -p 1 ./e2e/... -args -ginkgo.vv
211-
# - name: run-e2e-tests
212-
# id: run-e2e-tests
208+
# - name: run-e2e-with-immediate-logs
213209
# run: |
214-
# gotestsum --format pkgname --jsonfile log.json -- -v -timeout 3600s -p 1 ./e2e/... -ginkgo.vv
215-
- name: convert-to-human-readable
210+
# go test -v -timeout 3600s -p 1 ./e2e/... -args -ginkgo.vv
211+
- name: run-e2e-tests
212+
id: run-e2e-tests
213+
run: |
214+
gotestsum --format pkgname --jsonfile log.json -- -v -timeout 3600s -p 1 ./e2e/... -ginkgo.vv
215+
- name: convert-json-log-to-human-readable
216216
run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true
217217
- name: artifact-upload-step
218218
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)