rust-postgres/.circleci/config.yml

43 lines
1.2 KiB
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:
2019-08-11 03:25:12 +00:00
- image: rustlang/rust:nightly
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
2019-08-11 03:25:12 +00:00
# - run: rustup component add rustfmt clippy
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
2019-08-11 03:25:12 +00:00
# - run: cargo fmt --all -- --check
# - run: cargo clippy --all --all-targets --all-features
2017-07-09 02:40:03 +00:00
- run: cargo test --all
2018-12-17 05:30:52 +00:00
- run: cargo test --manifest-path tokio-postgres/Cargo.toml --no-default-features
2018-12-09 02:09:46 +00:00
- run: cargo test --manifest-path tokio-postgres/Cargo.toml --all-features
2018-04-15 21:23:14 +00:00
- *SAVE_DEPS