-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (49 loc) · 1.26 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 1,15 * *"
jobs:
fmt:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --check
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [stable, beta, nightly, 1.65]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain
with:
toolchain: ${{ matrix.rust }}
- name: Run tests
run: |
cargo test --all-features
cargo test --no-default-features
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
run: cargo clippy --all-features
fuzz-tests:
name: Fuzz tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-fuzz
- run: for fuzz_test in `cargo fuzz list`; do cargo fuzz run $fuzz_test -- -max_total_time=10 || exit 1; done