Skip to content

Commit 89dc33f

Browse files
committed
test ci
1 parent c6ccc6b commit 89dc33f

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.circleci/config.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,39 @@ jobs:
1010
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
1111
docker:
1212
- 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
1320
# Add steps to the job
1421
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
1522
steps:
1623
- checkout
1724
- 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"
1929
- run:
2030
name: "Build"
21-
command: "cargo build"
31+
command: "cargo build --release"
2232
- run:
2333
name: "Test"
2434
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"
2544
- save_cache:
26-
key: cargo-lock-2-{{ checksum "Cargo.lock" }}
45+
key: cargo-lock-3-{{ checksum "Cargo.lock" }}
2746
paths:
2847
- target
2948
- ~/.cargo

0 commit comments

Comments
 (0)