Skip to content

Commit

Permalink
Split CI test and audit steps
Browse files Browse the repository at this point in the history
  • Loading branch information
threema-danilo committed Apr 25, 2018
1 parent 729d272 commit 9907346
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: 2

jobs:
build:

test:
docker:
- image: rust:1.23
steps:
Expand All @@ -13,7 +15,6 @@ jobs:
- v4-cargo-cache-{{ .Branch }}
- v4-cargo-cache
- run: cargo build && cargo test
- run: cargo install --force cargo-audit && cargo audit
- save_cache:
key: v4-cargo-cache-{{ checksum "Cargo.lock" }}
paths:
Expand All @@ -29,3 +30,38 @@ jobs:
paths:
- target
- /usr/local/cargo
audit:
docker:
- image: rust:1.23
steps:
- checkout
- restore_cache:
keys:
- v1-cargo-audit-cache
- run: cargo install --force cargo-audit && cargo audit
- save_cache:
key: v1-cargo-audit-cache
paths:
- /usr/local/cargo

workflows:
version: 2

# Build on push
on_push:
jobs:
- test
- audit

# Build master every week on Monday at 04:00 am
weekly:
triggers:
- schedule:
cron: "0 4 * * 1"
filters:
branches:
only:
- master
jobs:
- test
- audit

0 comments on commit 9907346

Please sign in to comment.