-
-
Notifications
You must be signed in to change notification settings - Fork 25
90 lines (88 loc) · 2.99 KB
/
rust.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
name: Rust
on: [push, pull_request]
jobs:
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Run tests (only default features)
uses: actions-rs/cargo@v1
with:
command: test
- name: Run tests (all tests enabled)
uses: actions-rs/cargo@v1
with:
command: test
args: --features "refreshing-token-rustls-webpki-roots"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Check (default features)
uses: actions-rs/cargo@v1
with:
command: check
args: --examples --lib
- name: Check (native-tls)
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features "transport-tcp transport-tcp-native-tls transport-ws transport-ws-native-tls refreshing-token-native-tls metrics-collection with-serde" --lib --examples
- name: Check (rustls-native-roots)
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features "transport-tcp transport-tcp-rustls-native-roots transport-ws transport-ws-rustls-native-roots refreshing-token-rustls-native-roots metrics-collection with-serde" --lib --examples
- name: Check (rustls-webpki-roots)
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features "transport-tcp transport-tcp-rustls-webpki-roots transport-ws transport-ws-rustls-webpki-roots refreshing-token-rustls-webpki-roots metrics-collection with-serde" --lib --examples
- name: Check (no default features)
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --lib
- name: Check (default features with serde)
uses: actions-rs/cargo@v1
with:
command: check
args: --features "with-serde" --lib
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build documentation
uses: actions-rs/cargo@v1
with:
command: doc
# If updating this make sure to update Cargo.toml ([package.metadata.docs.rs]) too
args: --no-deps --no-default-features --features "refreshing-token-rustls-webpki-roots transport-tcp transport-tcp-rustls-webpki-roots transport-ws transport-ws-rustls-webpki-roots metrics-collection with-serde"
- uses: actions/upload-artifact@v2
with:
name: docs
path: target/doc/