-
Notifications
You must be signed in to change notification settings - Fork 6
64 lines (59 loc) · 1.69 KB
/
main.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
58
59
60
61
62
63
64
on:
push:
pull_request:
schedule:
- cron: '17 10 * * 6'
name: ci
jobs:
test_latest:
name: Build & Test (latest Rust version)
# runs-on cannot be parameterized yet: https://stackoverflow.com/questions/71961921/specify-runner-to-be-used-depending-on-condition-in-a-github-actions-workflow
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-ci
- uses: actions-rs/cargo@v1
with:
command: check
args: --locked --all-targets
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked
test_min:
name: Build & Test (min Rust version)
# runs-on cannot be parameterized yet: https://stackoverflow.com/questions/71961921/specify-runner-to-be-used-depending-on-condition-in-a-github-actions-workflow
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-ci
with:
rust-version: 1.81.0
- uses: actions-rs/cargo@v1
with:
command: check
args: --locked --all-targets
- uses: actions-rs/cargo@v1
with:
command: test
args: --locked
rustfmt:
name: rustfmt
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-ci
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: clippy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-ci
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked --all-targets -- -D warnings