-
Notifications
You must be signed in to change notification settings - Fork 41
98 lines (88 loc) · 3.48 KB
/
functional-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
name: Run functional tests
on:
workflow_call:
inputs:
version:
required: true
type: string
workflow_dispatch:
inputs:
version:
required: true
type: string
jobs:
functional-tests:
name: Functional tests for ${{ inputs.version }}
runs-on: ubuntu-20.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SKALED_RELEASE: ${{ inputs.version }}
NO_ULIMIT_CHECK: 1
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository: skalenetwork/skale-ci-integration_tests
ref: v3.20.0
submodules: recursive
- name: Set up Node
uses: actions/[email protected]
with:
node-version: 18
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install python3-pip python3-venv jq btrfs-progs nodejs npm
sudo npm install -g truffle
sudo npm install -g yarn
sudo chown -R runner:runner ~/.config # HACK
- name: Prepare SGX keys/certs
run: |
echo "${{ secrets.sgx_key }}" > sgx_certs/sgx.key
chmod 600 sgx_certs/sgx.key
sudo mkdir /skale_node_data
sudo cp -r sgx_certs /skale_node_data
sudo chown -R runner:runner /skale_node_data/sgx_certs/*
wc /skale_node_data/sgx_certs/sgx.key
- name: Update Environment
run: |
./update_environment.sh skaled+internals
./update_environment.sh skaled+load_python
./update_environment.sh skaled+load_js
./update_environment.sh skaled+contractsRunningTest
./update_environment.sh skaled+filestorage
./update_environment.sh skaled+api
- name: skaled+internals+pytest
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+pytest
- name: skaled+filestorage+all
run: SKALED_PROVIDER=skaled_providers/endpoint_by_container ./run_tests.sh skaled+filestorage+all
- name: skaled+contractsRunningTest+all
run: SKALED_PROVIDER=skaled_providers/endpoint_by_container ./run_tests.sh skaled+contractsRunningTest+all
- name: skaled+load_python+all
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+load_python+all
- name: skaled+load_js+run_angry_cats
run: SKALED_PROVIDER=skaled_providers/endpoint_by_container ./run_tests.sh skaled+load_js+run_angry_cats
- name: skaled+internals+test_snapshot_api
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_snapshot_api
- name: skaled+internals+test_node_rotation
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_node_rotation
- name: Fix access rights
run: |
sudo chown -R runner:runner /tmp/tmp* || true
sudo find ./integration_tests/skaled/internals/third_party/skale-node-tests/btrfs -type d -exec btrfs property set {} ro false \; || true
sudo chown -R runner:runner . || true
for C in $(docker ps -aq); do docker logs $C>$C.log; done || true
if: ${{ always() }}
- uses: actions/upload-artifact@v4
if: ${{ always() }}
continue-on-error: true
with:
name: debug-${{ inputs.version }}
path: |
skaled_providers
!skaled_providers/**/skaled
/tmp/tmp*
/tmp/*log
*.log
./integration_tests/skaled/internals/third_party/skale-node-tests/btrfs
!**/.env