Skip to content

Commit c0086dc

Browse files
committed
Fix circle
1 parent 31a8822 commit c0086dc

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.circleci/config.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
name: Install dependencies
1414
command: |
1515
yarn
16-
- run:
17-
name: Get submodules
18-
command: |
19-
git submodule update --init
2016
- run:
2117
name: Run tests
2218
command: |
@@ -42,15 +38,27 @@ jobs:
4238
# command: |
4339
# ./scripts/run-colony.sh
4440

41+
# It would be nice if all this could be a shell script but Circle is
42+
# extremely annoying about
43+
# a) cacheing
44+
# b) sudo
45+
# c) scripts
46+
# d) being in a docker container.
4547
e2e-zeppelin:
4648
docker:
4749
- image: circleci/node:10.12-stretch
4850
steps:
4951
- checkout
50-
- run:
51-
name: OpenZeppelin E2E
52-
command: |
53-
sudo URL=$CIRCLE_REPOSITORY_URL BRANCH=$CIRCLE_BRANCH ./scripts/run-zeppelin.sh
52+
- run: >
53+
sudo rm -rf node_modules &&
54+
PR_PATH=$(echo "$CIRCLE_REPOSITORY_URL#$CIRCLE_BRANCH" | sudo sed 's/git@github.com:/https:\/\/github.com\//') &&
55+
sudo git clone https://github.com/OpenZeppelin/openzeppelin-solidity.git &&
56+
cd openzeppelin-solidity &&
57+
sudo sed -i 's/cat coverage\/lcov.info | npx coveralls/echo "No coveralls"/g' scripts/test.sh &&
58+
sudo yarn &&
59+
sudo yarn remove solidity-coverage --dev &&
60+
sudo yarn add "$PR_PATH" --dev &&
61+
sudo npm run coverage
5462
5563
workflows:
5664
version: 2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ truffle-config.js. See the Network Configuration guide below.
3232
### Usage notes:
3333
+ Requires Solidity pragmas >= `0.5.0`.
3434
+ Tests run more slowly while coverage is being generated.
35-
+ Your contracts will be double-compiled and a (moderately alarming) delay between compilation and
35+
+ Your contracts will be double-compiled and a delay between compilation and
3636
the beginning of test execution is possible if your contracts are large.
3737
+ solidity-coverage expects a globally installed truffle in your environment / on CI. If you
3838
prefer to control which Truffle version your tests are run with, please see the FAQ for

scripts/run-zeppelin.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ set -o errexit
88
PR_PATH=$(echo "$URL#$BRANCH" | sed 's/git@github.com:/https:\/\/github.com\//')
99
echo "Installing $PR_PATH"
1010

11+
# Circle caches really agressively?
12+
sudo rm -rf node_modules
1113
sudo git clone https://github.com/OpenZeppelin/openzeppelin-solidity.git
1214
cd openzeppelin-solidity || exit
15+
sudo rm -rf node_modules
1316

1417
# EDITS
1518
# Use testrpc-sc ...

0 commit comments

Comments
 (0)