-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
30 lines (26 loc) · 904 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
image: 'rust:latest'
lint:fmt:
before_script:
- rustup component add rustfmt-preview
script:
- cargo fmt
- test $(git ls-files --modified | wc -l) -eq 0 || (echo 'You have introduced some unformatted code:'; git ls-files --modified | sed 's/^/* /'; echo 'Please run `cargo fmt` and amend your PR.'; exit 1)
lint:clippy:
before_script:
- apt update -yqq
- apt install -yqq --no-install-recommends libftdi1-dev
- rustup update stable
- rustup component add clippy
script:
- cargo clippy -- --deny warnings
- cargo clippy --tests -- --deny warnings
test:
stage: test
before_script:
- apt update -yqq
- apt install -yqq --no-install-recommends libftdi1-dev
- rustup update stable
script:
- rustc --version
- cargo --version
- cargo +stable test --verbose