Skip to content

Commit 533ee3c

Browse files
committed
fixed circleci...
1 parent 45ff676 commit 533ee3c

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

circle.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,20 @@ machine:
66

77
test:
88
pre:
9-
- docker build -t pg-uint .
10-
- docker run -d --name pguint pg-uint
9+
- docker build -t IMAGE0 .
10+
- docker export TMP | docker import - IMAGE
11+
- docker rm -f TMP
12+
- docker rmi -f IMAGE0
13+
- docker run --name TEST -d IMAGE
14+
# wait for the database to come up
15+
- until docker exec TEST psql -U postgres -l; do echo "Waiting for postgres to start..."; sleep 0.5; done
1116

1217
override:
1318
- docker exec pguint psql -U postgres -c "CREATE EXTENSION uint" && echo "SUCCESS"
1419
- docker exec pguint psql -U postgres -c "CREATE TABLE test(col1 uint1, col2 uint2, col4 uint4);" && echo "SUCCESS"
15-
- docker exec pguint psql -U postgres -c "INSERT INTO test(col1, col2, col4) SELECT v % 127, v % 16256, v FROM generate_series(1, 1000000) AS d(v)" && echo "SUCCESS"
16-
- docker exec pguint psql -U postgres -c "INSERT INTO test(col1, col2, col4) SELECT v % 127, v % 16256, v FROM generate_series(1, 1000000) AS d(v)" && echo "SUCCESS"
17-
20+
- docker exec pguint 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"
21+
- docker exec pguint psql -U postgres -c "WITH t AS (SELECT DISTINCT col1 FROM test) SELECT count(*) FROM t" && echo "SUCCESS"
1822
post:
19-
- docker stop pguint
20-
- docker rm -f pguint
21-
22-
deployment:
23-
hub:
24-
branch: /.*/
25-
commands:
26-
- docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD
27-
- docker tag pg-uint $DOCKER_HUB_USER_ID/postgres-uint:$CIRCLE_SHA1
28-
- docker tag pg-uint $DOCKER_HUB_USER_ID/postgres-uint:latest
29-
- docker push $DOCKER_HUB_USER_ID/postgres-uint:$CIRCLE_SHA1
30-
- docker push $DOCKER_HUB_USER_ID/postgres-uint:latest
23+
- docker stop TEST
24+
- docker rm -f TEST
3125

0 commit comments

Comments
 (0)