-
Notifications
You must be signed in to change notification settings - Fork 38
260 lines (224 loc) · 8.03 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
name: Run automated system tests
on:
push:
branches:
- master
pull_request:
branches:
- master
- support/**
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
release:
types:
- published
workflow_dispatch:
inputs:
neofs_node_ref:
description: 'Neofs-node ref. Default ref - latest master. Examples: v0.36.0, 8fdcc6d7e798e6511be8806b81894622e72d7fdc, branch_name'
required: false
default: ''
permissions: write-all
jobs:
run_system_tests:
runs-on: ubuntu-latest
timeout-minutes: 500
steps:
- name: Checkout neofs-testcases repository
uses: actions/checkout@v3
with:
repository: nspcc-dev/neofs-testcases
ref: 'master'
path: neofs-testcases
- name: Checkout neofs-dev-env repository
uses: actions/checkout@v3
with:
repository: nspcc-dev/neofs-dev-env
ref: 'master'
path: neofs-dev-env
- name: Checkout neofs-node repository
uses: actions/checkout@v3
with:
path: neofs-node
################################################################
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: true
go-version: '1.20'
- run: go version
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10.11'
- run: python --version
# Hashlib uses OpenSSL for ripemd160 and apparently OpenSSL disabled some older crypto algos around version 3.0
# in November 2021. All the functions are still there but require manual enabling.
# See https://github.com/openssl/openssl/issues/16994
# But we use ripemd160 for tests.
# For ripemd160 to be supported, we need the openssl configuration file to contain the following lines:
# openssl_conf = openssl_init
#
# [openssl_init]
# providers = provider_sect
#
# [provider_sect]
# default = default_sect
# legacy = legacy_sect
#
# [default_sect]
# activate = 1
#
# [legacy_sect]
# activate = 1
- name: Fix OpenSSL ripemd160
run: |
sudo python ./tools/src/openssl_config_fix.py
working-directory: neofs-testcases
################################################################
- name: Build neofs-node (neofs-cli and neofs-adm)
timeout-minutes: 5
run: |
make all
echo "$(pwd)/bin" >> $GITHUB_PATH
working-directory: neofs-node
################################################################
- name: Get TAG for docker images
run: |
echo "CURRENT_TAG=$( make version | sed 's/^v//' )" >> $GITHUB_ENV
working-directory: neofs-node
- name: Build NeoFS storage docker image
timeout-minutes: 30
run: |
make image-storage
working-directory: neofs-node
- name: Build NeoFS Inner Ring docker image
timeout-minutes: 30
run: |
make image-ir
working-directory: neofs-node
- name: Add NeoFS storage and NeoFS ir docker TAGs to testcases-env config file
run: |
sed -i "s/NODE_VERSION=.*/NODE_VERSION=${{ env.CURRENT_TAG }}/g" .github/testcases-env
sed -i "s/IR_VERSION=.*/IR_VERSION=${{ env.CURRENT_TAG }}/g" .github/testcases-env
working-directory: neofs-node
################################################################
- name: Copy testcases-env file to testcases-env in neofs-dev-env
run: |
cp .github/testcases-env ${GITHUB_WORKSPACE}/neofs-dev-env/.env
working-directory: neofs-node
- name: Prepare hosts
timeout-minutes: 5
run: |
make get
sudo ./bin/update_hosts.sh
sudo chmod a+w vendor/hosts
working-directory: neofs-dev-env
- name: Prepare test environment
timeout-minutes: 30
run: |
make prepare-test-env
echo "$(pwd)/vendor" >> $GITHUB_PATH
working-directory: neofs-dev-env
################################################################
- name: Log environment
run: |
echo "Check free space"
df -h
echo "=========================================="
echo "Check /etc/hosts"
cat /etc/hosts
echo "=========================================="
echo "Check docker images"
docker images
echo "=========================================="
echo "Check docker ps"
docker ps
echo "=========================================="
echo "Check neo-go version"
neo-go --version
echo "=========================================="
echo "Check neofs-s3-authmate version"
neofs-s3-authmate --version
echo "=========================================="
echo "Check neofs-s3-gw version"
echo "=========================================="
neofs-s3-gw --version
echo "=========================================="
echo "Check neofs-adm version"
neofs-adm --version
echo "=========================================="
echo "Check neofs-ir version"
neofs-ir --version
echo "=========================================="
echo "Check neofs-lens version"
neofs-lens --version
echo "=========================================="
echo "Check neofs-cli version"
neofs-cli --version
echo "=========================================="
echo "Check vendor dir"
ls -lah "${GITHUB_WORKSPACE}/neofs-dev-env/vendor"
echo "=========================================="
echo "Check bin dir"
ls -lah "${GITHUB_WORKSPACE}/neofs-node/bin"
echo "=========================================="
working-directory: neofs-dev-env
################################################################
- name: Prepare venv
timeout-minutes: 30
run: |
make venv.local-pytest
working-directory: neofs-testcases
- name: Run Sanity tests for pull requests
timeout-minutes: 120
if: github.event_name == 'pull_request'
run: |
source venv.local-pytest/bin/activate && pytest --show-capture=no -m "sanity" --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/testsuites
working-directory: neofs-testcases
- name: Run all tests for other events
timeout-minutes: 480
if: github.event_name != 'pull_request'
run: |
source venv.local-pytest/bin/activate && pytest --alluredir=${GITHUB_WORKSPACE}/allure-results pytest_tests/testsuites
working-directory: neofs-testcases
################################################################
- name: Get Allure history
timeout-minutes: 60
uses: actions/checkout@v3
if: always()
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action from marketplace
timeout-minutes: 60
uses: simple-elf/[email protected]
if: always()
id: allure-report
with:
keep_reports: 200
allure_results: allure-results
allure_report: allure-report
gh_pages: gh-pages
allure_history: allure-history
- name: Deploy report to Github Pages
timeout-minutes: 120
if: always()
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
force_orphan: true
enable_jekyll: true
- name: Post the link to the report
timeout-minutes: 60
if: always()
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Test report'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}
target_url: https://${{ github.repository_owner }}.github.io/neofs-node/${{ github.run_number }}