Browse Source

Update contracts image test stage entrypoint script, Update Makefile

develop
Apostolos Fanakis 4 years ago
parent
commit
21dec16061
  1. 4
      docker/Makefile
  2. 5
      docker/concordia-contracts/test-contracts.sh

4
docker/Makefile

@ -13,6 +13,8 @@ build-ganache:
@docker build . -f ./ganache/Dockerfile -t concordia-ganache
run-ganache:
@docker-compose -f ./ganache/docker-compose.yml -p concordia up -d
run-ganache-test:
@docker-compose -f ./ganache/docker-compose.test.yml -p concordia up -d
# Rendezvous targets
run-rendezvous:
@ -26,7 +28,7 @@ build-contracts-migrate:
build-contracts-tests:
@docker build ../ -f ./concordia-contracts/Dockerfile --target test -t concordia-contracts-tests --build-arg TZ=Europe/Athens
run-contract-tests:
@docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_ganache-network concordia-contracts-tests:latest
@docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=concordia_ganache-test-network concordia-contracts-tests:latest
run-contract-tests-host-chain:
@docker run --rm -v `pwd`/reports/contracts/:/usr/test-reports/ --env-file=./env/contracts.env --net=host concordia-contracts-tests:latest
run-contracts-migrate:

5
docker/concordia-contracts/test-contracts.sh

@ -1,8 +1,11 @@
#!/bin/sh
export CHAIN_HOST="$TEST_CHAIN_HOST"
export CHAIN_PORT="$TEST_CHAIN_PORT"
yarn _eslint -f html -o /usr/test-reports/concordia-contracts-eslint.html --no-color &&
(yarn _solhint >/usr/test-reports/concordia-contracts-solhint.report) &&
(yarn test >/usr/test-reports/concordia-contracts-truffle-tests.report)
(yarn test --network env >/usr/test-reports/concordia-contracts-truffle-tests.report)
if [ $? -eq 0 ]; then
echo "TESTS RAN SUCCESSFULLY!"

Loading…
Cancel
Save