Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable test builds #108

Draft
wants to merge 18 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 17 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,28 @@ services:
- docker

before_install:
- git clone https://github.com/gnosis/safe-relay-service.git
- git clone --depth=1 --branch=cpk-test https://github.com/gnosis/safe-relay-service.git

before_script:
- yarn gunash --node-type $NODE_TYPE
- cd safe-relay-service
- git checkout cpk-test
- docker-compose -f docker-compose.yml -f docker-compose.dev.yml build
- docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
- cd ..
- yarn wait-port -t 10000 localhost:8000

install:
- yarn global add [email protected]
- yarn install
after_script:
- cd safe-relay-service
- docker-compose logs web
- docker-compose down
- cd ..
- yarn gunash stop

jobs:
include:
- name: Ganache
before_script:
- CONTAINER_ID=$(docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d)
- ganache-cli -d --defaultBalanceEther 10000 -h 0.0.0.0 --noVMErrorsOnRPCResponse > /dev/null &
- sleep 60
script:
- yarn test
after_script:
- docker logs $CONTAINER_ID
- docker stop $CONTAINER_ID
- docker rm $CONTAINER_ID

#- name: Ganache with --noVMErrorsOnRPCResponse
# before_script:
# - CONTAINER_ID=$(docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d)
# - sleep 60
# script:
# - yarn test-rpc
# after_script:
# - docker logs $CONTAINER_ID
# - docker stop $CONTAINER_ID
# - docker rm $CONTAINER_ID

#- name: Geth
# before_script:
# - yarn geth-dev-assistant --accounts 2 --gasLimit 6721975
# script:
# - yarn test
# after_script:
# - docker stop geth-client
- name: Ganache with --noVMErrorsOnRPCResponse
env: NODE_TYPE="ganache --noVMErrorsOnRPCResponse"

#- name: OpenEthereum
# before_script:
# - PASSFILE=$(mktemp)
# - echo '' > $PASSFILE
# - chmod 644 $PASSFILE
# - CONTAINER_ID=$(docker run -d -p 8545:8545 -p 8546:8546 -v $PASSFILE:$PASSFILE openethereum/openethereum --config dev --jsonrpc-interface=all --ws-interface=all --unlock 0x00a329c0648769a73afac7f9381e08fb43dbea72 --password $PASSFILE)
# - yarn wait-port -t 10000 localhost:8545
# script:
# - yarn test
# after_script:
# - docker logs $CONTAINER_ID
# - docker stop $CONTAINER_ID
# - docker rm $CONTAINER_ID
- name: OpenEthereum
env: NODE_TYPE=openethereum

after_success: yarn coverage
2 changes: 1 addition & 1 deletion migrations/1-deploy-contracts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
"scripts": {
"generate-types": "typechain --target=truffle-v5 './build/contracts/*.json'",
"migrate": "tsc -p ./tsconfig.migrate.json --outDir ./migrations && truffle migrate --network local",
"test-ts": "TS_NODE_PROJECT='./tsconfig.cjs.json' nyc mocha -t 20000 -r ts-node/register -r jsdom-global/register ./test/contract-proxy-kit.ts --exit",
"test-ts": "cross-env TS_NODE_PROJECT='./tsconfig.cjs.json' nyc mocha -t 20000 -r ts-node/register -r jsdom-global/register ./test/contract-proxy-kit.ts --exit",
"test": "yarn generate-types && yarn migrate && yarn test-ts",
"test-rpc": "run-with-testrpc --noVMErrorsOnRPCResponse 'yarn test'",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"format": "prettier-eslint --write $PWD/'src/**/*.{js,ts,json}' $PWD/'test/**/*.{js,ts,json}'",
"build": "tsc && tsc -p tsconfig.cjs.json",
Expand Down Expand Up @@ -64,6 +63,7 @@
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"dotenv": "^8.2.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
Expand All @@ -72,6 +72,7 @@
"ethers-5": "npm:ethers@^5.0.14",
"ganache-cli": "^6.10.2",
"geth-dev-assistant": "^0.1.7",
"gunash": "^0.2.3",
"jsdom": "^16.4.0",
"jsdom-global": "^3.0.2",
"nyc": "^15.1.0",
Expand Down
Loading