mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 05:07:43 +00:00
fc0a0e2010
* [render skip] bump golang lint * bump golang * bump other actions * simplify workflow * simplify some more * specify golang version
29 lines
740 B
YAML
29 lines
740 B
YAML
on: [push, pull_request]
|
|
name: Unit Tests
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DATABASE_URL: postgres://postgres:postgres@localhost/apollo_test
|
|
services:
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_DB: apollo_test
|
|
POSTGRES_PASSWORD: postgres
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19.3
|
|
- uses: golangci/golangci-lint-action@v3
|
|
- run: psql -f docs/schema.sql $DATABASE_URL
|
|
- run: go test ./... -v -race -timeout 5s
|