-
-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (35 loc) · 927 Bytes
/
pr.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: PR
on:
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
cargo-test-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test
# Don't check the generated file, it doesn't quite match the style of rustfmt yet.
# - run: cargo fmt --check
- run: cargo fmt -p generate-api --check
- run: cargo clippy
- run: cargo clippy -p generate-api
rust_versions:
strategy:
matrix:
os: [ubuntu-latest]
rust_version: ["beta", "nightly", "1.56"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check