Skip to content

Commit 32c03dd

Browse files
author
bohendo
committed
Revert "lint scripts"
This reverts commit 7f7047b.
1 parent 9dc45fd commit 32c03dd

13 files changed

+99
-8941
lines changed

scripts/ci_test_brownie.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#!/usr/bin/env bash
22

3-
# Install eth-brownie if it's not already present
4-
if [[ -z "$(command -v brownie)" ]]
5-
then pip install eth-brownie
6-
fi
7-
3+
pip install eth-brownie
84
brownie bake token
9-
105
cd token || exit 255
116

12-
if ! crytic-compile . --compile-force-framework Brownie
13-
then echo "Brownie test failed" && exit 255
14-
else echo "Brownie test passed" && exit 0
7+
crytic-compile . --compile-force-framework Brownie
8+
9+
if [ $? -ne 0 ]
10+
then
11+
echo "Brownie test failed"
12+
exit 255
1513
fi

scripts/ci_test_buidler.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/usr/bin/env bash
22

3-
# Test buidler integration
3+
### Test buidler integration
44

55
cd tests/buidler || exit 255
66

7-
npm install || exit 255
7+
npm install --save-dev @nomiclabs/buidler
88

9-
if ! crytic-compile .
10-
then echo "Buidler test failed" && exit 255
11-
else echo "Buidler test passed" && exit 0
9+
crytic-compile .
10+
if [ $? -ne 0 ]
11+
then
12+
echo "buidler test failed"
13+
exit 255
1214
fi

scripts/ci_test_dapp.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Test dapp integration
3+
### Test dapp integration
44

55
DIR=$(mktemp -d)
66
cd "$DIR" || exit 255
@@ -16,7 +16,10 @@ nix-env -f "$HOME/.dapp/dapptools" -iA dapp seth solc hevm ethsign
1616

1717
dapp init
1818

19-
if ! crytic-compile . --compile-remove-metadata
20-
then echo "dapp test failed" && exit 255
21-
else echo "dapp test passed" && exit 0
19+
crytic-compile . --compile-remove-metadata
20+
if [ $? -ne 0 ]
21+
then
22+
echo "dapp test failed"
23+
exit 255
2224
fi
25+

scripts/ci_test_embark.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Test embark integration
3+
### Test embark integration
44

55
cd /tmp || exit 255
66

@@ -13,8 +13,11 @@ npm install -g [email protected]
1313
embark demo
1414
cd /tmp/embark_demo || exit 255
1515
npm install
16+
crytic-compile . --embark-overwrite-config --compile-remove-metadata
1617

17-
if ! crytic-compile . --embark-overwrite-config --compile-remove-metadata
18-
then echo "Embark test failed" && exit 255
19-
else echo "Embark test passed" && exit 0
18+
if [ $? -ne 0 ]
19+
then
20+
echo "Embark test failed"
21+
exit 255
2022
fi
23+

scripts/ci_test_etherlime.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
#!/usr/bin/env bash
22

3-
# Test etherlime integration
3+
### Test etherlime integration
44

55
DIR=$(mktemp -d)
66
cd "$DIR" || exit 255
77

8-
# Install etherlime if it's not already present
9-
if [[ -z "$(command -v etherlime)" ]]
10-
then npm i -g etherlime
11-
fi
12-
8+
npm i -g etherlime
139
etherlime init
10+
crytic-compile . --compile-remove-metadata
1411

15-
if ! crytic-compile . --compile-remove-metadata
16-
then echo "Etherlime test failed" && exit 255
17-
else echo "Etherlime test passed" && exit 0
12+
if [ $? -ne 0 ]
13+
then
14+
echo "Etherlime test failed"
15+
exit 255
1816
fi
17+

scripts/ci_test_etherscan.sh

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
#!/usr/bin/env bash
22

3-
# Test etherscan integration
3+
### Test etherscan integration
44

55
DIR=$(mktemp -d)
66
cd "$DIR" || exit 255
77

88
solc-select use 0.4.25 --always-install
99

10-
if ! crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
11-
then echo "Etherscan test failed" && exit 255
10+
crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
11+
12+
if [ $? -ne 0 ]
13+
then
14+
echo "Etherscan test failed"
15+
exit 255
1216
fi
1317

18+
crytic-compile rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
1419

15-
if ! crytic-compile rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
16-
then echo "Etherscan test failed" && exit 255
20+
if [ $? -ne 0 ]
21+
then
22+
echo "Etherscan test failed"
23+
exit 255
1724
fi
1825

1926
# From crytic/slither#1154
20-
if ! crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
21-
then echo "Etherscan test failed" && exit 255
22-
fi
27+
crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
2328

24-
echo "Etherscan test passed" && exit 0
29+
if [ $? -ne 0 ]
30+
then
31+
echo "Etherscan test failed"
32+
exit 255
33+
fi

scripts/ci_test_foundry.sh

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
#!/usr/bin/env bash
22

3-
# Test foundry integration
3+
### Test foundry integration
44

5-
# Setup temp environment
6-
DIR=$(mktemp -d)
7-
cd "$DIR" || exit 255
5+
6+
cd /tmp || exit 255
7+
8+
curl -L https://foundry.paradigm.xyz | bash
9+
export PATH=$PATH:/home/runner/.foundry/bin
10+
foundryup
811

912
# The foundry init process makes a temporary local git repo and needs certain values to be set
1013
git config --global user.email "[email protected]"
1114
git config --global user.name "CI User"
1215

13-
# Install foundry if it's not already present
14-
if [[ -z "$(command -v foundryup)" ]]
15-
then
16-
curl -L https://foundry.paradigm.xyz | bash
17-
export PATH=$PATH:/home/runner/.foundry/bin
18-
fi
19-
20-
foundryup
16+
mkdir forge_test
17+
cd forge_test || exit 255
2118
forge init
2219

23-
if ! crytic-compile .
24-
then echo "Foundry test failed" && exit 255
25-
else echo "Foundry test passed" && exit 0
20+
crytic-compile .
21+
if [ $? -ne 0 ]
22+
then
23+
echo "foundry test failed"
24+
exit 255
2625
fi

scripts/ci_test_hardhat.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ cd tests/hardhat || exit 255
66

77
npm install
88

9-
if ! crytic-compile .
10-
then echo "Hardhat test failed" && exit 255
11-
else echo "Hardhat test passed" && exit 0
9+
crytic-compile .
10+
if [ $? -ne 0 ]
11+
then
12+
echo "hardhat test failed"
13+
exit 255
1214
fi

scripts/ci_test_solc.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/usr/bin/env bash
22

33
DIR=$(mktemp -d)
4+
45
cp tests/contract.sol "$DIR"
56
cd "$DIR" || exit 255
6-
77
crytic-compile contract.sol --compile-remove-metadata --export-format truffle
88

99
cd - || exit 255
1010
DIFF=$(diff "$DIR/crytic-export/C.json" tests/expected/solc-demo.json)
1111
if [ "$?" != "0" ] || [ "$DIFF" != "" ]
12-
then echo -e "solc test failed\n$DIFF" && exit 255
13-
else echo -e "solc test passed" && exit 0
12+
then
13+
echo "solc test failed"
14+
echo "$DIFF"
15+
exit 255
1416
fi
17+
18+

scripts/ci_test_truffle.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,15 @@
55
DIR=$(mktemp -d)
66
cd "$DIR" || exit 255
77

8-
# Install truffle if it's not already present
9-
if [[ -z "$(command -v truffle)" ]]
10-
then npm install -g truffle
11-
fi
12-
8+
npm install -g truffle
139
truffle unbox metacoin
10+
crytic-compile . --compile-remove-metadata
1411

15-
if ! crytic-compile . --compile-remove-metadata
16-
then echo "Truffle test failed" && exit 255
17-
else echo "Truffle test passed" && exit 0
12+
if [ $? -ne 0 ]
13+
then
14+
echo "Truffle test failed"
15+
exit 255
1816
fi
19-
2017
# TODO: for some reason truffle output is not deterministc
2118
# The assigned id changes
2219
#cd -

0 commit comments

Comments
 (0)