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

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

@ -1,8 +1,11 @@
#!/bin/sh #!/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 _eslint -f html -o /usr/test-reports/concordia-contracts-eslint.html --no-color &&
(yarn _solhint >/usr/test-reports/concordia-contracts-solhint.report) && (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 if [ $? -eq 0 ]; then
echo "TESTS RAN SUCCESSFULLY!" echo "TESTS RAN SUCCESSFULLY!"

Loading…
Cancel
Save