-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (95 loc) · 2.59 KB
/
check.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
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
name: Check
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt --check
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# NOTE: Commented out nightly builds for now, see: https://github.com/liamwh/surreal-id/actions/runs/9061443687/job/24893200609?pr=26
# doc:
# runs-on: ubuntu-latest
# name: nightly / doc
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Install nightly
# uses: dtolnay/rust-toolchain@nightly
# - name: cargo doc
# run: cargo doc --no-deps --all-features
# env:
# RUSTDOCFLAGS: --cfg docsrs
hack:
runs-on: ubuntu-latest
name: ubuntu / stable / features
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: cargo hack
run: cargo hack --feature-powerset check --lib --tests
dependency-audit:
runs-on: ubuntu-latest
name: Dependency audit
steps:
- uses: actions/checkout@v3
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
cargo-deny:
name: cargo-deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
# - advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}