File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -10,20 +10,39 @@ 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 : sharding_user
16
+ password : sharding_user
17
+ environment :
18
+ POSTGRES_USER : root
19
+ POSTGRES_DB : shard0
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
- key : cargo-lock-2-{{ checksum "Cargo.lock" }}
25
+ key : cargo-lock-3-{{ checksum "Cargo.lock" }}
26
+ - run :
27
+ name : " Install dependencies"
28
+ command : " apt-get update && apt-get install postgresql-contrib-12 postgresql-client-12"
19
29
- run :
20
30
name : " Build"
21
- command : " cargo build"
31
+ command : " cargo build --release "
22
32
- run :
23
33
name : " Test"
24
34
command : " cargo test"
35
+ - run :
36
+ name : " Launch in background"
37
+ command : " ./target/release/pgcat &"
38
+ - run :
39
+ name : " PgBench initialize"
40
+ command : " pgbench -i -h 127.0.0.1 -p 6432"
41
+ - run :
42
+ name : " PgBench run"
43
+ command : " pgbench -h 127.0.0.1 -p 6432 --protocol extended -t 100 -c 2"
25
44
- save_cache :
26
- key : cargo-lock-2 -{{ checksum "Cargo.lock" }}
45
+ key : cargo-lock-3 -{{ checksum "Cargo.lock" }}
27
46
paths :
28
47
- target
29
48
- ~/.cargo
You can’t perform that action at this time.
0 commit comments