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

153 lines
3.8 KiB
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-05-30 12:49:29 +02:00
kms:
docker:
- image: circleci/golang:1.12
working_directory: ~/offen/kms
steps:
- checkout:
path: ~/offen
- restore_cache:
key: offen-kms-{{ checksum "go.mod" }}
- run:
name: Download modules
command: go mod download
- save_cache:
paths:
- /go/pkg/mod
key: offen-kms-{{ checksum "go.mod" }}
- run:
name: Generate one-off key file
command: make bootstrap
2019-05-30 12:49:29 +02:00
- run:
name: Run tests
command: make test-ci
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-20 01:37:26 +02:00
- 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
2019-04-10 18:17:24 +02:00
- run:
name: Run tests
2019-04-20 01:37:26 +02:00
command: make test-ci
2019-04-11 15:48:36 +02:00
2019-04-20 04:50:49 +02:00
vault:
docker:
2019-04-20 17:06:06 +02:00
- image: circleci/node:10-browsers
2019-04-20 04:50:49 +02:00
working_directory: ~/offen/vault
steps:
- checkout:
path: ~/offen
- restore_cache:
key: offen-vault-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm install
- save_cache:
paths:
- ~/offen/vault/node_modules
key: offen-vault-{{ checksum "package.json" }}
- run:
name: Run tests
2019-04-27 04:35:53 +02:00
command: npm test
2019-04-20 04:50:49 +02:00
2019-05-10 12:54:39 +02:00
script:
docker:
- image: circleci/node:10-browsers
working_directory: ~/offen/script
steps:
- checkout:
path: ~/offen
- restore_cache:
key: offen-script-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm install
- save_cache:
paths:
- ~/offen/script/node_modules
key: offen-script-{{ checksum "package.json" }}
- run:
name: Run tests
command: npm test
2019-05-21 16:58:40 +02:00
auditorium:
docker:
- image: circleci/node:10-browsers
working_directory: ~/offen/auditorium
steps:
- checkout:
path: ~/offen
- restore_cache:
key: offen-auditorium-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm install
- save_cache:
paths:
- ~/offen/auditorium/node_modules
key: offen-auditorium-{{ checksum "package.json" }}
- run:
name: Run tests
command: npm test
2019-05-23 16:36:21 +02:00
packages:
docker:
- image: circleci/node:10-browsers
working_directory: ~/offen/packages
steps:
- checkout:
path: ~/offen
- restore_cache:
key: offen-packages-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm install
- save_cache:
paths:
- ~/offen/packages/node_modules
key: offen-packages-{{ checksum "package.json" }}
- run:
name: Run tests
command: npm test
2019-04-11 15:48:36 +02:00
workflows:
version: 2
build_and_test:
jobs:
- server
2019-05-30 12:49:29 +02:00
- kms
2019-04-20 04:50:49 +02:00
- vault
2019-05-10 12:54:39 +02:00
- script
2019-05-21 16:58:40 +02:00
- auditorium
2019-05-23 16:36:21 +02:00
- packages