rust-postgres/.circleci/config.yml

40 lines
973 B
YAML
Raw Normal View History

2017-08-11 02:27:05 +00:00
restore_registry: &RESTORE_REGISTRY
restore_cache:
key: registry
save_registry: &SAVE_REGISTRY
save_cache:
key: registry-{{ .BuildNum }}
paths:
2018-04-15 21:23:14 +00:00
- /usr/local/cargo/registry/index
2017-08-11 02:27:05 +00:00
deps_key: &DEPS_KEY
2018-04-15 21:23:14 +00:00
key: deps-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }}
2017-08-11 02:27:05 +00:00
restore_deps: &RESTORE_DEPS
restore_cache:
<<: *DEPS_KEY
save_deps: &SAVE_DEPS
save_cache:
<<: *DEPS_KEY
paths:
2018-04-15 21:23:14 +00:00
- target
- /usr/local/cargo/registry/cache
2017-08-11 02:27:05 +00:00
2017-07-09 02:40:03 +00:00
version: 2
jobs:
build:
docker:
- image: rust:1.30.1
2018-01-10 05:25:35 +00:00
environment:
RUSTFLAGS: -D warnings
2018-11-29 03:36:25 +00:00
- image: sfackler/rust-postgres-test:5
2017-07-09 02:40:03 +00:00
steps:
- checkout
2018-04-15 21:23:14 +00:00
- *RESTORE_REGISTRY
2017-07-09 02:40:03 +00:00
- run: cargo generate-lockfile
2018-04-15 21:23:14 +00:00
- *SAVE_REGISTRY
- run: rustc --version > ~/rust-version
- *RESTORE_DEPS
2017-07-09 02:40:03 +00:00
- run: cargo test --all
- run: cargo test -p postgres --all-features
- run: cargo test -p tokio-postgres --all-features
2018-04-15 21:23:14 +00:00
- *SAVE_DEPS