Skip to content

Merge pull request #139 from vegaprotocol/do-it-again #182

Merge pull request #139 from vegaprotocol/do-it-again

Merge pull request #139 from vegaprotocol/do-it-again #182

name: Docker / ganache
on:
push:
branches:
- main
paths:
- 'ganache/version.json'
pull_request:
paths:
- 'ganache/**'
- '.github/workflows/docker-ganache.yml'
jobs:
build_docker_image:
uses: vegaprotocol/docker/.github/workflows/docker-generic.yml@main
with:
image_name: ganache
docker_context_path: ./ganache
platforms: linux/amd64, linux/arm64
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Build local ganache image
working-directory: ./ganache
run: docker build -t vegaprotocol/ganache:local .
- name: Install test deps
working-directory: ./ganache/scripts/testing
run:
npm install
- name: Run token tests
working-directory: ./ganache/scripts/testing
run: |
docker run --rm -p 8545:8545 --detach vegaprotocol/ganache:local \
--miner.blockTime 1 \
--chain.chainId 1440 \
--chain.networkId 1441 \
--database.dbPath /app/ganache-db \
-h 0.0.0.0 \
-p 8545 \
--wallet.mnemonic "ozone access unlock valid olympic save include omit supply green clown session";
sleep 30;
node test_tokens.js