Skip to content

Commit 3ca1c8c

Browse files
author
bohendo
committed
harden monorepo tests
1 parent 5afa62c commit 3ca1c8c

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

scripts/ci_test_hardhat.sh

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

3-
### Test hardhat integration
3+
echo "Testing hardhat integration of $(realpath "$(which crytic-compile)")"
44

55
cd tests/hardhat || exit 255
66

77
npm install
88

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

scripts/ci_test_monorepo.sh

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

3-
### Test monorepo integration
3+
echo "Testing monorepo integration of $(realpath "$(which crytic-compile)")"
44

55
cd tests/monorepo || exit 255
66

77
npm install
88

9+
echo "Testing from the root of a monorepo"
10+
if ! crytic-compile ./contracts
11+
then echo "Monorepo test failed" && exit 255
12+
fi
13+
914
cd contracts || exit 255
1015

16+
echo "Testing from within a subdir of a monorepo"
1117
if ! crytic-compile .
1218
then echo "Monorepo test failed" && exit 255
13-
else echo "Monorepo test passed" && exit 0
1419
fi
20+
21+
echo "Monorepo test passed" && exit 0

0 commit comments

Comments
 (0)