Skip to content

Commit e62b635

Browse files
committed
Add integration tests
Setup integration test matrix in CircleCI. Signed-off-by: Ben Kochie <[email protected]>
1 parent c1ddbee commit e62b635

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.circleci/config.yml

+32
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,27 @@ jobs:
2020
- prometheus/store_artifact:
2121
file: postgres_exporter
2222

23+
integration:
24+
docker:
25+
- image: circleci/golang:1.15
26+
- image: << parameters.postgres_image >>
27+
environment:
28+
DATA_SOURCE_NAME: 'postgresql://postgres:test@localhost:5432/circle_test?sslmode=disable'
29+
POSTGRES_DB: circle_test
30+
POSTGRES_USER: postgres
31+
POSTGRES_PASSWORD: test
32+
33+
parameters:
34+
postgres_image:
35+
type: string
36+
37+
steps:
38+
- checkout
39+
- setup_remote_docker
40+
- run: docker version
41+
- run: make build
42+
- run: make test GOOPTS='-tags integration'
43+
2344
workflows:
2445
version: 2
2546
postgres_exporter:
@@ -28,6 +49,17 @@ workflows:
2849
filters:
2950
tags:
3051
only: /.*/
52+
- integration:
53+
matrix:
54+
parameters:
55+
postgres_image:
56+
- circleci/postgres:9.4
57+
- circleci/postgres:9.5
58+
- circleci/postgres:9.6
59+
- circleci/postgres:10
60+
- circleci/postgres:11
61+
- circleci/postgres:12
62+
- circleci/postgres:13
3163
- prometheus/build:
3264
name: build
3365
filters:

0 commit comments

Comments
 (0)