-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.83 KB
/
Copy pathpull-request.yml
File metadata and controls
63 lines (61 loc) · 1.83 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
name: Pull Request
on:
pull_request:
# run CI/CD against main as well, to generate cache
push:
branches:
- main
jobs:
test:
strategy:
matrix:
version: ['1.56.0', 'stable', 'nightly']
runs-on: [ubuntu-latest]
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}
profile: minimal
override: true
- name: Test
run: cargo test
- name: Build
run: cargo build --release
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-make
- run: cargo clippy --all-targets --all-features -- --deny warnings
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc
format:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- uses: Swatinem/rust-cache@v2
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-make
- run: cargo make format