blob: e36a71484f48bed47ee6f2637463f021e3b7710d (
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
|
stages:
- test
.setup_template: &setup_template
stage: test
image: debian:stable-slim
before_script:
- export CARGO_HOME="$CI_PROJECT_DIR/.cargo"
- export PATH="$PATH:$CARGO_HOME/bin"
- export RUST_BACKTRACE=full
- apt-get update > /dev/null
- apt-get install -y curl build-essential > /dev/null
- curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_VERSION
- rustup --version
- rustc --version
- cargo --version
.test_all_template: &test_all_template
<<: *setup_template
script:
- cargo test --all
test-stable:
<<: *test_all_template
variables:
RUST_VERSION: stable
test-beta:
<<: *test_all_template
variables:
RUST_VERSION: beta
test-nightly:
<<: *test_all_template
variables:
RUST_VERSION: nightly
test-1.31.0:
<<: *setup_template
script:
- cargo test --tests # skip doctests
variables:
RUST_VERSION: 1.31.0
test-fmt:
<<: *setup_template
script:
- cargo fmt --all -- --check
- RUTSFLAGS='--cfg nightly_fmt' cargo fmt --all -- --check
variables:
RUST_VERSION: stable
|