-
-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (51 loc) · 1.5 KB
/
ci.yml
File metadata and controls
61 lines (51 loc) · 1.5 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
name: CI
permissions: {}
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
defaults:
run:
shell: bash
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
# - os: windows-latest
# - os: macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-rust@23f38cfb0c04af97a055f76acee94d5be71c7c82 # v1.0.16
with:
save-cache: ${{ github.ref_name == 'main' }}
- run: cargo check --all-targets --all-features
- run: cargo test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-rust@23f38cfb0c04af97a055f76acee94d5be71c7c82 # v1.0.16
with:
components: clippy rust-docs rustfmt
- run: |
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
- uses: crate-ci/typos@cf5f1c29a8ac336af8568821ec41919923b05a83 # v1.45.1
with:
files: .