-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (51 loc) · 1.44 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
56
57
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions: read-all
env:
CARGO_TERM_COLOR: always
jobs:
clippy-rustfmt:
runs-on: ubuntu-latest
name: clippy / ${{ matrix.toolchain }}
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [ stable, nightly ]
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: cargo clippy
uses: actions-rs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
name: test / ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [ stable, nightly ]
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --locked
run: cargo test --locked --all-features