name: Test on: [ push, pull_request ] jobs: test: strategy: matrix: go-version: [ 1.14.x ] goarch: [ "amd64" ] runs-on: ubuntu-latest steps: - name: Install Go uses: actions/setup-go@v1 with: go-version: ${{ matrix.go-version }} env: GOARCH: ${{ matrix.goarch }} - name: Checkout code uses: actions/checkout@v2 - name: Postgres run: docker run --rm --name hermez-db-test -p 5432:5432 -e POSTGRES_DB=history -e POSTGRES_USER=hermez -e POSTGRES_PASSWORD="${{ secrets.POSTGRES_PASS }}" -d postgres && sleep 2s && docker exec hermez-db-test psql -a history -U hermez -c "CREATE DATABASE l2;" - name: Test env: POSTGRES_PASS: ${{ secrets.POSTGRES_PASS }} ETHCLIENT_DIAL_URL: ${{ secrets.ETHCLIENT_DIAL_URL }} GOARCH: ${{ matrix.goarch }} run: go test -p 1 ./...
name: Test
on: [ push, pull_request ]
jobs:
test:
strategy:
matrix:
go-version: [ 1.14.x ]
goarch: [ "amd64" ]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: Checkout code
uses: actions/checkout@v2
- name: Postgres
run: docker run --rm --name hermez-db-test -p 5432:5432 -e POSTGRES_DB=history -e POSTGRES_USER=hermez -e POSTGRES_PASSWORD="${{ secrets.POSTGRES_PASS }}" -d postgres && sleep 2s && docker exec hermez-db-test psql -a history -U hermez -c "CREATE DATABASE l2;"
- name: Test
POSTGRES_PASS: ${{ secrets.POSTGRES_PASS }}
ETHCLIENT_DIAL_URL: ${{ secrets.ETHCLIENT_DIAL_URL }}
run: go test -p 1 ./...