-
Notifications
You must be signed in to change notification settings - Fork 10
108 lines (91 loc) · 2.71 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
test_manager:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.11]
env:
ETH_PRIVATE_KEY: ${{ secrets.ETH_PRIVATE_KEY }}
ENDPOINT: ${{ secrets.ENDPOINT }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
MANAGER_TAG: "1.10.0-v1.10.0.0"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: bash ./scripts/install_python_dependencies.sh
- name: Lint with flake8
run: flake8 .
- name: Launch hardhat node
working-directory: hardhat-node
run: |
docker compose up -d && sleep 20
- name: Deploy manager
run: |
bash ./helper-scripts/deploy_test_manager.sh
docker rmi -f skalenetwork/skale-manager:${{ env.MANAGER_TAG }}
- name: Show stats before tests
if: always()
run: |
sudo lsblk -f
sudo free -h
- name: Run tests
run: |
bash ./scripts/run_manager_tests.sh
- name: Codecov
run: |
codecov -t $CODECOV_TOKEN
- name: Show stats after tests
if: always()
run: |
sudo lsblk -f
sudo free -h
test_allocator:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.11]
env:
ENDPOINT: ${{ secrets.ENDPOINT }}
ETH_PRIVATE_KEY: ${{ secrets.ETH_PRIVATE_KEY }}
MANAGER_TAG: "1.9.0-develop.20"
ALLOCATOR_TAG: "2.2.2-develop.0"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install host dependencies
run: bash ./scripts/install_host_dependencies.sh
- name: Install python dependencies
run: bash ./scripts/install_python_dependencies.sh
- name: Launch hardhat node
working-directory: hardhat-node
run: |
docker compose up -d && sleep 20
- name: Deploy manager contracts
run: |
bash ./helper-scripts/deploy_test_manager.sh
docker rmi -f skalenetwork/skale-manager:${{ env.MANAGER_TAG }}
- name: Deploy allocator contracts
run: |
bash ./helper-scripts/deploy_test_allocator.sh
docker rmi -f skalenetwork/skale-allocator:${{ env.ALLOCATOR_TAG }}
- name: Run tests
run: |
bash ./scripts/run_allocator_tests.sh
- name: Show stats after tests
if: always()
run: |
sudo lsblk -f
sudo free -h