Skip to content

Commit b79d2da

Browse files
committed
ci: update ci.yml, add fmt, clippy, docs, stable&nightly.
Similar to the ci.yml used in http-rs.
1 parent 3d13429 commit b79d2da

File tree

1 file changed

+49
-9
lines changed

1 file changed

+49
-9
lines changed

.github/workflows/test.yml

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,56 @@
1-
name: Test
1+
name: CI
22

33
on:
4-
push:
5-
branches: [master, develop]
64
pull_request:
7-
branches: [master, develop]
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
10+
env:
11+
RUSTFLAGS: -Dwarnings
812

913
jobs:
10-
build:
11-
runs-on: ubuntu-latest
14+
build_and_test:
15+
name: Build and test
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest]
20+
rust: [stable, nightly]
1221

1322
steps:
14-
- uses: actions/checkout@v2
15-
- name: Run tests
16-
run: cargo test --verbose --features="all"
23+
- uses: actions/checkout@master
24+
25+
- name: Install ${{ matrix.rust }}
26+
uses: actions-rs/toolchain@v1
27+
with:
28+
toolchain: ${{ matrix.rust }}
29+
override: true
30+
31+
- name: check
32+
uses: actions-rs/cargo@v1
33+
with:
34+
command: check
35+
args: --all --bins --examples --features=all
36+
37+
- name: tests
38+
uses: actions-rs/cargo@v1
39+
with:
40+
command: test
41+
args: --all --features=all
42+
43+
check_fmt_and_docs:
44+
name: Checking fmt, clippy, and docs
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@master
48+
49+
- name: clippy
50+
run: cargo clippy --tests --examples --bins -- -D warnings
51+
52+
- name: fmt
53+
run: cargo fmt --all -- --check
54+
55+
- name: Docs
56+
run: cargo doc --no-deps

0 commit comments

Comments
 (0)