-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.39 KB
/
ci.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
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
check-aggregate:
# Follows the guide at <https://github.com/re-actors/alls-green>.
runs-on: ubuntu-latest
if: always()
needs:
# If you're modifying this workflow file and you're adding/removing a job
# which should be required to pass before merging a PR, don't forget to
# update this list!
- check
- test
steps:
- name: Compute whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: deploy-github-pages
jobs: ${{ toJSON(needs) }}
check:
name: check
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
- run: cargo check --all-targets --all-features
- run: cargo clippy --all-targets --all-features
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
- run: cargo nextest run --workspace --all-features