-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.11 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
name: CI
on: [ push, pull_request ]
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- stable
- beta
- nightly
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
version: 2025.1.14
- name: Remove rust from mise
run: |
# a different rust version will be installed in the next step
mise rm rust
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- uses: Swatinem/[email protected]
- run: lefthook run --force pre-commit
- run: cargo hack test --feature-powerset
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose