2021-07-22 02:05:29 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: test
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
2022-04-23 17:15:16 +00:00
|
|
|
- push
|
|
|
|
- pull_request
|
2021-07-22 02:05:29 +00:00
|
|
|
|
|
|
|
steps:
|
2022-04-22 15:21:25 +00:00
|
|
|
- name: database healthcheck
|
|
|
|
image: 'postgres:14.2-alpine'
|
|
|
|
environment:
|
|
|
|
PGUSER: postgres
|
|
|
|
PGPASSWORD: postgres
|
|
|
|
PGHOST: db
|
|
|
|
commands:
|
|
|
|
- while ! pg_isready; do sleep 1; done
|
2021-07-22 02:05:29 +00:00
|
|
|
- name: test
|
2022-04-22 15:21:25 +00:00
|
|
|
image: 'elixir:1.13.4'
|
|
|
|
environment:
|
|
|
|
MIX_ENV: test
|
2021-07-22 02:05:29 +00:00
|
|
|
POSTGRES_HOST: db
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASS: postgres
|
|
|
|
commands:
|
|
|
|
- mix do local.rebar --force, local.hex --force, deps.get, deps.compile
|
|
|
|
- mix test --cover --trace --slowest 10
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: db
|
2022-04-22 15:21:25 +00:00
|
|
|
image: 'postgres:14.2-alpine'
|
2021-07-22 02:05:29 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|