-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (68 loc) · 2.02 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
name: Test
on: [push]
env:
ETH_PRIVATE_KEY: ${{ secrets.ETH_PRIVATE_KEY }}
SCHAIN_TYPE: ${{ secrets.SCHAIN_TYPE }}
MANAGER_TAG: "1.10.0-v1.10.0.0"
IMA_TAG: "1.3.4-beta.5"
SGX_WALLET_TAG: "1.83.0-beta.5"
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
PYTHON_VERSION: 3.11
jobs:
test_core:
runs-on: self-hosted
env:
ETH_PRIVATE_KEY: ${{ secrets.ETH_PRIVATE_KEY }}
ENDPOINT: http://127.0.0.1:8545
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SCHAIN_TYPE: ${{ secrets.SCHAIN_TYPE }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install python dependencies
run: |
source ../.venv/bin/activate
uv pip install -r requirements.txt --prerelease=allow
uv pip install -r requirements-dev.txt
- name: Lint with flake8
run: uv run flake8 .
- name: Launch anvil node
run: |
docker run -d --network host --name anvil ghcr.io/foundry-rs/foundry anvil && sleep 5 && docker logs anvil --tail 1000
- name: Deploy manager & ima contracts
run: |
bash ./helper-scripts/deploy_test_ima.sh
- name: Show stats before tests
if: always()
run: |
lsblk -f
free -h
- name: Run core tests
run: |
source ../.venv/bin/activate
bash ./scripts/run_core_tests.sh
- name: Cleanup docker artifacts
run: |
docker rm -f $(docker ps -aq)
- name: Show stats after core tests
if: always()
run: |
lsblk -f
free -h
- name: Run firewall tests
run: |
bash ./scripts/run_firewall_test.sh
- name: Show stats after firewall tests
if: always()
run: |
lsblk -f
free -h
- name: Cleanup docker artifacts
if: always()
run: |
docker rm -f $(docker ps -aq)
- name: Run codecov
run: |
source ../.venv/bin/activate
codecov -t $CODECOV_TOKEN