2019-09-01 00:18:29 +08:00
|
|
|
kind: pipeline
|
|
|
|
name: tests-integration
|
|
|
|
steps:
|
2019-09-01 00:27:35 +08:00
|
|
|
- name: setup
|
|
|
|
image: postgres
|
|
|
|
commands:
|
2019-09-01 00:33:39 +08:00
|
|
|
- sleep 5
|
2019-09-01 00:27:35 +08:00
|
|
|
- cat postgres/*.sql | psql --host pg --user root --db core
|
2019-09-01 00:18:29 +08:00
|
|
|
- name: go
|
|
|
|
image: golang:1.12
|
|
|
|
commands:
|
|
|
|
- go test -tags=integration
|
|
|
|
environment:
|
|
|
|
POSTGRES: postgresql://root@pg:5432/core?sslmode=disable
|
|
|
|
services:
|
|
|
|
- name: pg
|
|
|
|
image: postgres
|
|
|
|
environment:
|
2019-09-01 00:27:35 +08:00
|
|
|
POSTGRES_USER: root
|
|
|
|
POSTGRES_PASSWORD:
|
|
|
|
POSTGRES_DB: core
|
2019-09-01 00:18:29 +08:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: tests-unit
|
|
|
|
steps:
|
|
|
|
- name: go
|
|
|
|
image: golang:1.12
|
|
|
|
commands:
|
|
|
|
- go test -tags=unit
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|