forked from antoine-de/mimirsbrunn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (46 loc) · 941 Bytes
/
.gitlab-ci.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
image: docker:stable
services:
- docker:stable-dind
variables:
GIT_SSL_NO_VERIFY: "1"
stages:
- check
- build
.update-rust: &update-rust
- rustup update
- cargo update
.check-rust: &check-rust
- rustc --version
- cargo --version
default:
before_script:
- *check-rust
format:
stage: check
image: rust:latest
script:
- rustup component add rustfmt
- cargo fmt --all -- --check
lint:
stage: check
image: rust:latest
script:
- rustup component add clippy
- cargo clippy --workspace --bins --examples --tests --release -- -D warnings
coverage:
stage: check
image: rust:latest
script:
- cargo install cargo-tarpaulin -f
- cargo tarpaulin -v
coverage: /\d+.\d+% coverage/
build-release:
stage: build
image: rust:latest
script:
- cargo build --release
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- Cargo.lock
- target/release/