-
Notifications
You must be signed in to change notification settings - Fork 89
91 lines (86 loc) · 3.67 KB
/
aspect-test.yaml
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
name: Aspect Test
env:
test_node_addr: "https://betanet-rpc1.artela.network"
key_privateKey: "0xa9e70c59c34171623b5aceba9976288912bd45539d4029188836914e24decdd5"
key_attack_accounts: "0xaf919292bab87f4f9b13ce45406023bca55953a34682039298a7048f1c7e99b7"
key_aspect_accounts: "0xcf8e42a2dc63d0b38ef004ecd2e2a6478158a84b4772ff244093961cae348ae8"
on:
push:
branches: [ ci_test ]
pull_request:
branches: [ ci_test ]
repository_dispatch:
types: [ trigger-action ]
branches:
- main
- ci_test
jobs:
test-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Preparation
run: |
mkdir -p test_scripts
cat > test_scripts/init_env.sh <<EOF
source ~/.nvm/nvm.sh
set -ex
cd /aspect-tooling/packages/testcases
sed -i "s|\"node\": \".*\"|\"node\": \"$test_node_addr\"|g" project.config.json && cat project.config.json
# key1
echo $key_attack_accounts > attack_accounts.txt
# key2
echo $key_privateKey > privateKey.txt
# key3
echo $key_aspect_accounts > aspect_accounts.txt
cd tests
node $1
EOF
cat > test_scripts/run.sh << EOF
docker run --rm --name testenv -v $(pwd)/test_scripts:/test_scripts -i simonalphafang/aspect-tooling:0.0.4 /bin/bash -c /test_scripts/init_env.sh $1
EOF
chmod +x -R test_scripts/
- name: context-aspect.test.js
run: bash -c test_scripts/run.sh context-aspect.test.js
- name: context-permission-check.test.js
run: bash -c test_scripts/run.sh context-permission-check.test.js
- name: contract-aspect.test.js
run: bash -c test_scripts/run.sh contract-aspect.test.js
- name: cross-phase-property.test.js
run: bash -c test_scripts/run.sh cross-phase-property.test.js
- name: cross-phase-property.test.js
run: bash -c test_scripts/run.sh cross-phase-property.test.js
- name: crypto-ecrecover-aspect.test.js
run: bash -c test_scripts/run.sh crypto-ecrecover-aspect.test.js
- name: crypto-hash-aspect.test.js
run: bash -c test_scripts/run.sh crypto-hash-aspect.test.js
- name: eoa-test-aspect.test.js
run: bash -c test_scripts/run.sh eoa-test-aspect.test.js
- name: guard-by-count.test.js
run: bash -c test_scripts/run.sh guard-by-count.test.js
- name: guard-by-lock.test.js
run: bash -c test_scripts/run.sh guard-by-lock.test.js
- name: guard-by-trace.test.js
run: bash -c test_scripts/run.sh guard-by-trace.test.js
- name: invalid-jit-call-aspect.test.js
run: bash -c test_scripts/run.sh invalid-jit-call-aspect.test.js
- name: invalid-static-call-test-aspect.test.js
run: bash -c test_scripts/run.sh invalid-static-call-test-aspect.test.js
- name: multi-read-write-check.test.js
run: bash -c test_scripts/run.sh multi-read-write-check.test.js
- name: operation-aspect.test.js
run: bash -c test_scripts/run.sh operation-aspect.test.js
- name: state-aspect.test.js
run: bash -c test_scripts/run.sh state-aspect.test.js
- name: statedb-aspect.test.js
run: bash -c test_scripts/run.sh statedb-aspect.test.js
- name: static-call-aspect.test.js
run: bash -c test_scripts/run.sh static-call-aspect.test.js
- name: storage-aspect.test.js
run: bash -c test_scripts/run.sh storage-aspect.test.js
- name: type-check-aspect.test.js
run: bash -c test_scripts/run.sh type-check-aspect.test.js
- name: upgrade-test-aspect.test.js
run: bash -c test_scripts/run.sh upgrade-test-aspect.test.js
- name: verify-aspect.test.js
run: bash -c test_scripts/run.sh verify-aspect.test.js