-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (95 loc) · 2.5 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
permissions:
contents: read
on:
# Run on push to main branch and on pull requests
push:
branches: [main]
pull_request:
concurrency:
# Only run the latest workflow
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: check
jobs:
typos:
name: typos
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/[email protected]
conventional_commit:
name: conventional commit check
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Fetch all commits to generate the changelog
fetch-depth: 0
- name: Conventional commit check
uses: cocogitto/cocogitto-action@main
with:
check: true
conventional_commit_pr:
name: PR conventional commit check
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Fetch all commits to generate the changelog
fetch-depth: 0
# pick the pr HEAD instead of the merge commit
ref: ${{ github.event.pull_request.head.sha }}
- name: Conventional commit check
uses: cocogitto/cocogitto-action@main
with:
check: true
clippy:
name: ${{ matrix.toolchain }} / clippy
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
audit:
name: cargo audit
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: audit check
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
hack:
name: hack
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: cargo hack
run: cargo hack --feature-powerset check