Skip to content

Commit a357584

Browse files
djcctz
authored andcommitted
Extend GitHub Actions configuration
1 parent 2abf6ae commit a357584

File tree

1 file changed

+88
-6
lines changed

1 file changed

+88
-6
lines changed

.github/workflows/build.yml

+88-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
name: rustls
2+
3+
permissions:
4+
contents: read
5+
16
on: [push, pull_request]
2-
name: hyper-rustls
37

48
jobs:
59
build:
6-
name: "Build and test"
10+
name: Build+test
711
runs-on: ${{ matrix.os }}
812
strategy:
13+
fail-fast: false
914
matrix:
1015
# test a bunch of toolchains on ubuntu
1116
rust:
1217
- stable
1318
- beta
1419
- nightly
20+
- 1.50.0
1521
os: [ubuntu-18.04]
1622
# but only stable on macos/windows (slower platforms)
1723
include:
@@ -22,13 +28,18 @@ jobs:
2228
steps:
2329
- name: Checkout sources
2430
uses: actions/checkout@v2
31+
with:
32+
persist-credentials: false
2533

2634
- name: Install ${{ matrix.rust }} toolchain
2735
uses: actions-rs/toolchain@v1
2836
with:
2937
toolchain: ${{ matrix.rust }}
3038
override: true
3139

40+
- name: cargo check (default features)
41+
run: cargo check --all-targets
42+
3243
- name: cargo test (debug; default features)
3344
run: cargo test
3445
env:
@@ -41,10 +52,81 @@ jobs:
4152

4253
- name: cargo test (debug; webpki-tokio only)
4354
run: cargo test --no-default-features --features webpki-tokio
55+
env:
56+
RUST_BACKTRACE: 1
57+
58+
- name: cargo test (debug; all features)
59+
run: cargo test --all-features
60+
env:
61+
RUST_BACKTRACE: 1
62+
63+
- name: cargo build (debug; no default features)
64+
run: cargo build --no-default-features
65+
66+
- name: cargo test (debug; no default features; no run)
67+
run: cargo test --no-default-features --no-run
68+
69+
- name: cargo test (release; no run)
70+
run: cargo test --release --no-run
71+
72+
docs:
73+
name: Check for documentation errors
74+
runs-on: ubuntu-18.04
75+
steps:
76+
- name: Checkout sources
77+
uses: actions/checkout@v2
78+
with:
79+
persist-credentials: false
80+
81+
- name: Install rust toolchain
82+
uses: actions-rs/toolchain@v1
83+
with:
84+
toolchain: nightly
85+
override: true
86+
default: true
4487

45-
- name: cargo test (debug; no default features)
46-
run: cargo test --no-default-features
88+
- name: cargo doc (all features)
89+
run: cargo doc --all-features --no-deps
90+
env:
91+
RUSTDOCFLAGS: -Dwarnings
4792

48-
- name: cargo test (release)
49-
run: cargo test --release
93+
format:
94+
name: Format
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Checkout sources
98+
uses: actions/checkout@v2
99+
with:
100+
persist-credentials: false
101+
- name: Install rust toolchain
102+
uses: actions-rs/toolchain@v1
103+
with:
104+
toolchain: stable
105+
override: true
106+
default: true
107+
components: rustfmt
108+
- name: Check formatting
109+
uses: actions-rs/cargo@v1
110+
with:
111+
command: fmt
112+
args: --all -- --check
50113

114+
clippy:
115+
name: Clippy
116+
runs-on: ubuntu-latest
117+
steps:
118+
- name: Checkout sources
119+
uses: actions/checkout@v2
120+
with:
121+
persist-credentials: false
122+
- name: Install rust toolchain
123+
uses: actions-rs/toolchain@v1
124+
with:
125+
toolchain: stable
126+
override: true
127+
default: true
128+
components: clippy
129+
- uses: actions-rs/cargo@v1
130+
with:
131+
command: clippy
132+
args: --all-features -- -D warnings

0 commit comments

Comments
 (0)