-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (67 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
86 lines (67 loc) · 1.92 KB
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
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
types: [opened, synchronize, reopened, closed]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
permissions:
contents: read
pull-requests: write
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.event.action != 'closed'
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.95.0
components: clippy, rustfmt
- name: Cache cargo tools
uses: actions/cache@v5
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }}
- name: Install just
uses: extractions/setup-just@v4
- name: Install cargo tools
run: just install-tools
- name: Lint
run: just lint
- name: Check dependencies
run: just deny
- name: Run tests
run: just test
- name: Audit dependencies
run: just audit
commitlint:
name: Commitlint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action != 'closed'
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install commitlint
run: |
npm install -g @commitlint/cli @commitlint/config-conventional
- name: Validate commit messages
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.sha }} --verbose