2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 09:00:28 +01:00

correctly handle flags in main test

This commit is contained in:
Frederik Ring 2019-04-19 17:37:26 -06:00
parent 65323a1597
commit 48b91e13d2
3 changed files with 13 additions and 2 deletions

View File

@ -23,9 +23,19 @@ jobs:
paths: paths:
- /go/pkg/mod - /go/pkg/mod
key: offen-server-{{ checksum "go.mod" }} key: offen-server-{{ checksum "go.mod" }}
- run:
name: Waiting for Postgres to be ready
command: |
for i in `seq 1 10`;
do
nc -z localhost 5432 && echo Success && exit 0
echo -n .
sleep 1
done
echo Failed waiting for Postgres && exit 1
- run: - run:
name: Run tests name: Run tests
command: make test command: make test-ci
workflows: workflows:
version: 2 version: 2

View File

@ -18,7 +18,7 @@ To work on the `server` you will need to install `docker-compose` and Go 1.12+.
First, bootstrap the dockerized Postgres database used for development: First, bootstrap the dockerized Postgres database used for development:
``` ```
docker-compose run server go run cmd/bootstrap/main.go docker-compose run server make bootstrap
``` ```
Run the server: Run the server:

View File

@ -6,6 +6,7 @@ server:
- $GOPATH/pkg/mod:/go/pkg/mod - $GOPATH/pkg/mod:/go/pkg/mod
environment: environment:
- GOPATH=/go - GOPATH=/go
- POSTGRES_CONNECTION_STRING=postgres://postgres:develop@database:5432/postgres?sslmode=disable
ports: ports:
- 8080:8080 - 8080:8080
command: go run cmd/server/main.go -conn postgres://postgres:develop@database:5432/postgres?sslmode=disable command: go run cmd/server/main.go -conn postgres://postgres:develop@database:5432/postgres?sslmode=disable