2020-09-09 15:49:35 +00:00
|
|
|
name: Docker Build
|
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Run docker build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run docker build
|
|
|
|
run: make docker-build
|
2021-02-19 20:23:45 +00:00
|
|
|
test:
|
2021-04-19 11:24:58 +00:00
|
|
|
name: Run unit tests
|
2021-02-19 20:23:45 +00:00
|
|
|
env:
|
|
|
|
GOPATH: /tmp/go
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version: [1.14.x, 1.15.x]
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Create GOPATH
|
|
|
|
run: mkdir -p /tmp/go
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run database
|
|
|
|
run: docker-compose up -d db
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
sleep 10
|
|
|
|
PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 make test
|