File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,31 @@ jobs:
10
10
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
11
11
docker :
12
12
- image : cimg/rust:1.58.1
13
+ - image : cimg/postgres:14.0
14
+ auth :
15
+ username : mydockerhub-user
16
+ password : $DOCKERHUB_PASSWORD
17
+ environment :
18
+ POSTGRES_USER : postgres
19
+ POSTGRES_DB : postgres
13
20
# Add steps to the job
14
21
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
15
22
steps :
16
23
- checkout
17
24
- restore_cache :
18
25
key : cargo-lock-2-{{ checksum "Cargo.lock" }}
26
+ - run :
27
+ name : " Install dependencies"
28
+ command : " sudo apt-get update && sudo apt-get install -y postgresql-contrib-12 postgresql-client-12"
19
29
- run :
20
30
name : " Build"
21
31
command : " cargo build"
22
32
- run :
23
33
name : " Test"
24
34
command : " cargo test"
35
+ - run :
36
+ name : " Test end-to-end"
37
+ command : " bash .circleci/run_tests.sh"
25
38
- save_cache :
26
39
key : cargo-lock-2-{{ checksum "Cargo.lock" }}
27
40
paths :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -o xtrace
5
+
6
+ ./target/debug/pgcat &
7
+
8
+ sleep 1
9
+
10
+ psql -e -h 127.0.0.1 -p 5432 -U postgres -f tests/sharding/query_routing_setup.sql
11
+
12
+ # Setup PgBench
13
+ pgbench -i -h 127.0.0.1 -p 6432
14
+
15
+ # Run it
16
+ pgbench -h 127.0.0.1 -p 6432 -t 500 -c 2
17
+
18
+ psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_insert.sql
19
+
20
+ psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_select.sql > /dev/null
21
+
22
+ # psql -f tests/sharding/query_routing_test_validate.sql
23
+
24
+ psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_primary_replica.sql > /dev/null
You can’t perform that action at this time.
0 commit comments