-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
21 lines (19 loc) · 1022 Bytes
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
test:
pre:
- docker build -t image .
- docker run --name TEST -d image
# wait for the database to come up
- until docker exec TEST psql -U postgres -l; do echo "Waiting for postgres to start..."; sleep 0.5; done
override:
- docker exec TEST psql -U postgres -c "CREATE EXTENSION uint" && echo "SUCCESS"
- docker exec TEST psql -U postgres -c "CREATE TABLE test(col1 uint1, col2 uint2, col4 uint4);" && echo "SUCCESS"
- docker exec TEST psql -U postgres -c "INSERT INTO test(col1, col2, col4) SELECT v % 127, v % 16256, v FROM generate_series(1, 100000) AS d(v)" && echo "SUCCESS"
- docker exec TEST psql -U postgres -c "WITH t AS (SELECT DISTINCT col1 FROM test) SELECT count(*) FROM t" && echo "SUCCESS"
post:
- docker stop TEST
- docker rm -f TEST