File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 69
69
env :
70
70
TEST_TYPE : ${{ matrix.type }}
71
71
GITHUB_ETHERSCAN : ${{ secrets.GITHUB_ETHERSCAN }}
72
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
73
shell : bash
73
74
run : |
74
75
bash "scripts/ci_test_${TEST_TYPE}.sh"
Original file line number Diff line number Diff line change @@ -7,27 +7,44 @@ cd "$DIR" || exit 255
7
7
8
8
solc-select use 0.4.25 --always-install
9
9
10
+ delay_no_key () {
11
+ # Perform a small sleep when API key is not available (e.g. on PR CI from external contributor)
12
+ if [ " $GITHUB_ETHERSCAN " = " " ]; then
13
+ sleep 5s
14
+ fi
15
+ }
16
+
17
+ echo " ::group::Etherscan mainnet"
10
18
crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
11
19
12
20
if [ $? -ne 0 ]
13
21
then
14
- echo " Etherscan test failed"
22
+ echo " Etherscan mainnet test failed"
15
23
exit 255
16
24
fi
25
+ echo " ::endgroup::"
17
26
27
+ delay_no_key
28
+
29
+ echo " ::group::Etherscan rinkeby"
18
30
crytic-compile rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
19
31
20
32
if [ $? -ne 0 ]
21
33
then
22
- echo " Etherscan test failed"
34
+ echo " Etherscan rinkeby test failed"
23
35
exit 255
24
36
fi
37
+ echo " ::endgroup::"
38
+
39
+ delay_no_key
25
40
26
41
# From crytic/slither#1154
42
+ echo " ::group::Etherscan #3"
27
43
crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
28
44
29
45
if [ $? -ne 0 ]
30
46
then
31
- echo " Etherscan test failed"
47
+ echo " Etherscan #3 test failed"
32
48
exit 255
33
49
fi
50
+ echo " ::endgroup::"
You can’t perform that action at this time.
0 commit comments