Repository navigation
67 lines (59 loc) · 1.82 KB
/
Copy pathpull_request.yaml
File metadata and controls
67 lines (59 loc) · 1.82 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
name: Pull Request
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
on:
pull_request:
branches:
- "main"
jobs:
test:
name: 🧪 Test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
- run: cargo test
platform:
name: 🧪 Test (${{ matrix.runner }})
strategy:
fail-fast: false
matrix:
runner:
- macos-15
- windows-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
- run: cargo test
format:
name: 📝 Format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-xfmt
- run: cargo xfmt --check
lint:
name: 🤓 Lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --workspace -- -D warnings
build:
name: 🔨 Check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
- run: cargo check