rust-postgres/.circleci/config.yml

44 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:
- /usr/local/cargo/registry/index
deps_key: &DEPS_KEY
key: deps-1.19.0-{{ checksum "Cargo.lock" }}
restore_deps: &RESTORE_DEPS
restore_cache:
<<: *DEPS_KEY
save_deps: &SAVE_DEPS
save_cache:
<<: *DEPS_KEY
paths:
- target
- /usr/local/cargo/registry/cache
2017-07-09 02:40:03 +00:00
version: 2
jobs:
build:
working_directory: ~/build
docker:
2017-08-11 02:27:05 +00:00
- image: rust:1.19.0
2017-07-15 19:49:42 +00:00
- image: sfackler/rust-postgres-test:2
2017-07-09 02:40:03 +00:00
steps:
- checkout
- run: apt-get update
- run: DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq
2017-08-11 02:27:05 +00:00
- <<: *RESTORE_REGISTRY
2017-07-09 02:40:03 +00:00
- run: cargo generate-lockfile
2017-08-11 02:27:05 +00:00
- <<: *SAVE_REGISTRY
- <<: *RESTORE_DEPS
2017-07-09 02:40:03 +00:00
- run: cargo test --all
- run: cargo test --manifest-path=postgres/Cargo.toml --features "$(cargo read-manifest --manifest-path=postgres/Cargo.toml | jq -r '.features|keys|map(select(. != "with-security-framework" and . != "with-schannel"))|join(" ")')"
- run: cargo test --manifest-path=tokio-postgres/Cargo.toml --all-features
2017-08-11 02:27:05 +00:00
- <<: *SAVE_DEPS