2
0
mirror of https://github.com/offen/website.git synced 2024-11-23 01:20:29 +01:00
website/.circleci/config.yml

35 lines
834 B
YAML
Raw Normal View History

2019-04-10 18:17:24 +02:00
version: 2
2019-04-11 15:48:36 +02:00
2019-04-10 18:17:24 +02:00
jobs:
2019-04-11 15:48:36 +02:00
server:
2019-04-10 18:17:24 +02:00
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
2019-04-11 15:48:36 +02:00
working_directory: ~/offen/server
2019-04-10 18:17:24 +02:00
steps:
2019-04-11 15:48:36 +02:00
- checkout:
path: ~/offen
2019-04-10 18:17:24 +02:00
- restore_cache:
2019-04-11 20:19:57 +02:00
key: offen-server-{{ checksum "go.mod" }}
2019-04-10 18:17:24 +02:00
- run:
name: Download modules
command: go mod download
- save_cache:
paths:
- /go/pkg/mod
2019-04-11 20:19:57 +02:00
key: offen-server-{{ checksum "go.mod" }}
2019-04-10 18:17:24 +02:00
- run:
name: Run tests
command: make test
2019-04-11 15:48:36 +02:00
workflows:
version: 2
build_and_test:
jobs:
- server