forked from LukeMathWalker/build-your-own-jira-with-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
86 lines (82 loc) · 2.15 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: 2
jobs:
build-and-test:
docker:
- image: circleci/rust
environment:
# Fail the build if there are warnings
RUSTFLAGS: '-D warnings'
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- run:
name: Calculate dependencies
command: cargo generate-lockfile
- restore_cache:
keys:
- v2-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Build all targets
command: cargo build
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v2-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Run all tests
command: cargo test
security:
docker:
- image: circleci/rust
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- run:
name: Install dependency auditing tool
command: cargo install cargo-audit
- run:
name: Check for known security issues in dependencies
command: cargo audit
format-and-lint:
docker:
- image: circleci/rust
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- run:
name: Install formatter
command: rustup component add rustfmt
- run:
name: Install Clippy
command: rustup component add clippy
- run:
name: Formatting
command: cargo fmt --all -- --check
- run:
name: Linting
command: cargo clippy -- -D warnings
workflows:
version: 2
build-test:
jobs:
- build-and-test:
filters:
tags:
only: /.*/
- security:
filters:
tags:
only: /.*/
- format-and-lint:
filters:
tags:
only: /.*/