Skip to content

chore(test): setup docker and github actions #38

chore(test): setup docker and github actions

chore(test): setup docker and github actions #38

Workflow file for this run

name: Run tests
on: [push, pull_request]
env:
IMAGE_TAG: world-token
jobs:
test:
name: Docker build and test
runs-on: ubuntu-latest
services:
ganache:
image: david9595/ganache-image:v1
options: --name ganache
ports:
- 8545:8545
steps:
- name: Debugging information
run: |
echo "GitHub Server URL: $GITHUB_SERVER_URL"
echo "Local Ganache URL: $GITHUB_SERVER_URL:8545"
- name: Check out the repository
uses: actions/checkout@v2
- name: Build the Docker image
run: docker build -t $IMAGE_TAG --target=truffle .
- name: Run tests in Docker container
run: docker run --rm $IMAGE_TAG sh -c 'truffle test --network development'