blob: 09c951a2eb09e6d71b715d973a058864d3add1ac (
plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
version: 2.1
jobs:
test-nightly:
docker:
- image: cimg/rust:1.63.0
steps:
- checkout
- run: cargo --version
- run:
name: Install Rust nightly
command: rustup install nightly
- run:
name: Setting Rust nightly as default
command: rustup default nightly
- restore_cache:
name: Restore cache of Cargo data
keys:
- cargo-cache
- run:
name: Run tests with all features enabled
command: cargo test --workspace --all-features
- run:
name: Run tests with only default features enabled
command: cargo test --workspace
- save_cache:
name: Save cache of Cargo data
key: cargo-cache
paths:
- ~/.cargo
test-stable:
docker:
- image: cimg/rust:1.63.0
steps:
- checkout
- run: cargo --version
- restore_cache:
name: Restore cache of Cargo data
keys:
- cargo-cache
- run:
name: Run tests with all features except factory enabled
command: cargo test --workspace --features async
- run:
name: Run tests with only default features enabled
command: cargo test --workspace
- save_cache:
name: Save cache of Cargo data
key: cargo-cache
paths:
- ~/.cargo
coverage:
machine: true
steps:
- checkout
- run:
name: Code Coverage
command: |
docker run \
--security-opt seccomp=unconfined \
-v "${PWD}:/volume" \
xd009642/tarpaulin:0.22.0-nightly \
cargo \
+nightly \
tarpaulin \
--workspace \
--all-features \
--ciserver circle-ci \
--out Xml
bash <(curl -s https://codecov.io/bash)
lints-stable:
docker:
- image: cimg/rust:1.63.0
steps:
- checkout
- run: cargo --version
- restore_cache:
name: Restore cache of Cargo data
keys:
- cargo-cache
- run:
name: Run Clippy
command: cargo clippy --workspace
- save_cache:
name: Save cache of Cargo data
key: cargo-cache
paths:
- ~/.cargo
lints-nightly:
docker:
- image: cimg/rust:1.63.0
steps:
- checkout
- run: cargo --version
- run:
name: Install Rust nightly
command: rustup install nightly
- run:
name: Setting Rust nightly as default
command: rustup default nightly
- restore_cache:
name: Restore cache of Cargo data
keys:
- cargo-cache
- run:
name: Run Clippy with all features enabled
command: cargo clippy --workspace --all-features
- save_cache:
name: Save cache of Cargo data
key: cargo-cache
paths:
- ~/.cargo
code-style:
docker:
- image: cimg/rust:1.63.0
steps:
- checkout
- run: cargo --version
- run:
name: Install Rust nightly
command: rustup install nightly
- run:
name: Setting Rust nightly as default
command: rustup default nightly
- run:
name: Run Rustfmt
command: find src macros/src -type f -name "*.rs" -exec rustfmt --edition 2021 --check {} \;
workflows:
test:
jobs:
- test-nightly
- test-stable
- coverage
checks:
jobs:
- lints-stable
- lints-nightly
- code-style
|