-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (103 loc) · 4.5 KB
/
nightly.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
name: Skaled Nightly Tests
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
skaled_release:
description: 'Skaled Release'
default: 'develop-latest'
required: true
jobs:
main_job:
runs-on: ubuntu-20.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SKALED_RELEASE: ${{ github.event.inputs.skaled_release || 'develop-latest' }}
#SKALED_RELEASE: develop-latest
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_access_key: ${{ secrets.AWS_ACCESS_KEY }}
TF_VAR_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NO_ULIMIT_CHECK: 1
steps:
- name: Set up Node
uses: actions/[email protected]
with:
node-version: 16
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install python3-pip python3-venv jq btrfs-progs nodejs npm cpulimit
sudo npm install -g truffle
sudo npm install -g yarn
curl -O https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/containerd.io_1.4.3-1_amd64.deb
sudo apt install ./containerd.io_1.4.3-1_amd64.deb # for docker! https://stackoverflow.com/questions/65555109/docker-ce-depends-containerd-io-1-4-1-but-it-is-not-going-to-be-installe
sudo chown -R runner:runner ~/.config # HACK
- name: Add secrets
run: |
touch ~/.netrc
chmod 600 ~/.netrc
echo "machine github.com" > ~/.netrc
echo "login ${{ secrets.DIMALIT_ACCESS_TOKEN }}" >> ~/.netrc
echo "password ${{ secrets.DIMALIT_ACCESS_TOKEN }}" >> ~/.netrc
echo "${{ secrets.elvis_oregon_pem }}" > ~/elvis-oregon.pem
- uses: docker-practice/actions-setup-docker@v1
- uses: hashicorp/[email protected]
with:
terraform_wrapper: false
- uses: actions/checkout@v2
with:
ssh-key: '${{secrets.RUNNER_SSH_KEY}}'
submodules: 'recursive'
- run: cd skaled_providers/endpoint_by_terraform_with_containers/tf/tf_scripts && terraform init
- 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+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+internals+test_node_rotation
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_node_rotation
- name: skaled+internals+stop_in_snapshot
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+stop_in_snapshot
- name: skaled+internals+test_snapshot_api
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_snapshot_api
- 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@v2
if: ${{ always() }}
continue-on-error: true
with:
name: debug
path: |
skaled_providers
!skaled_providers/**/skaled
/tmp/tmp*
/tmp/*.log
*.log
./integration_tests/skaled/internals/third_party/skale-node-tests/btrfs
!**/.env
!**/*.tfvars