forked from jonhoo/rust-imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
109 lines (108 loc) · 3.1 KB
/
azure-pipelines.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
jobs:
- job: test
displayName: cargo test --{examples,doc,lib}
strategy:
matrix:
Linux-stable:
vmImage: ubuntu-latest
rust: stable
Linux-beta:
vmImage: ubuntu-latest
rust: beta
Linux-nightly:
vmImage: ubuntu-latest
rust: nightly
MacOS:
vmImage: macOS-10.14
rust: stable
Windows:
vmImage: windows-2019
rust: stable
continueOnError: $[eq(variables.rust, 'nightly')]
pool:
vmImage: $(vmImage)
steps:
- template: install-rust.yml@templates
parameters:
rust: $(rust)
- script: cargo check --all-targets --all-features
displayName: cargo check
- script: cargo test --examples --all-features
displayName: cargo test --examples
- script: cargo test --doc --all-features
displayName: cargo test --doc
- script: cargo test --lib --all-features
displayName: cargo test --lib
- script: |
set -e
rustup component add rustfmt
cargo fmt --all -- --check
displayName: cargo fmt --check
condition: and(eq( variables['rust'], 'beta' ), eq( variables['Agent.OS'], 'Linux' ))
- script: |
set -e
rustup component add clippy
cargo clippy -- -D warnings
displayName: cargo clippy
condition: and(eq( variables['rust'], 'beta' ), eq( variables['Agent.OS'], 'Linux' ))
# This represents the minimum Rust version supported.
# Tests are not run as tests may require newer versions of rust.
- job: msrv
pool:
vmImage: ubuntu-latest
displayName: "Minimum supported Rust version: 1.43.0"
dependsOn: []
steps:
- template: install-rust.yml@templates
parameters:
rust: 1.43.0 # nom6 depends on bitvec (1.43+)
- script: cargo check
displayName: cargo check
- job: integration
displayName: cargo test --tests
pool:
vmImage: ubuntu-latest
services:
greenmail: greenmail
steps:
- template: install-rust.yml@templates
- script: cargo test --tests
displayName: cargo test
- template: coverage.yml@templates
parameters:
token: $(CODECOV_TOKEN_SECRET)
services:
greenmail: greenmail
env:
TEST_HOST: greenmail
- job: features
displayName: "Check feature combinations"
pool:
vmImage: ubuntu-latest
steps:
- template: install-rust.yml@templates
parameters:
rust: stable
- script: cargo install cargo-hack
displayName: install cargo-hack
- script: cargo hack --feature-powerset check --all-targets
displayName: cargo hack
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
ref: refs/heads/v0.4
endpoint: jonhoo
containers:
- container: greenmail
image: greenmail/standalone:1.6.3
ports:
- 3025:3025
- 3110:3110
- 3143:3143
- 3465:3465
- 3993:3993
- 3995:3995
env:
GREENMAIL_OPTS: "-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose"