mirror of
https://github.com/offen/website.git
synced 2024-11-22 17:10:29 +01:00
35 lines
834 B
YAML
35 lines
834 B
YAML
version: 2
|
|
|
|
jobs:
|
|
server:
|
|
docker:
|
|
- image: circleci/golang:1.12
|
|
environment:
|
|
- POSTGRES_CONNECTION_STRING=postgres://circle:test@localhost:5432/circle_test?sslmode=disable
|
|
- image: circleci/postgres:11.2-alpine
|
|
environment:
|
|
- POSTGRES_USER=circle
|
|
- POSTGRES_PASSWORD=test
|
|
working_directory: ~/offen/server
|
|
steps:
|
|
- checkout:
|
|
path: ~/offen
|
|
- restore_cache:
|
|
key: offen-server-{{ checksum "go.mod" }}
|
|
- run:
|
|
name: Download modules
|
|
command: go mod download
|
|
- save_cache:
|
|
paths:
|
|
- /go/pkg/mod
|
|
key: offen-server-{{ checksum "go.mod" }}
|
|
- run:
|
|
name: Run tests
|
|
command: make test
|
|
|
|
workflows:
|
|
version: 2
|
|
build_and_test:
|
|
jobs:
|
|
- server
|