-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.38 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
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
# Avoid duplicate jobs on PR from a branch on the same repo
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install 1.72.0
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-make
- uses: taiki-e/install-action@cargo-deny
- run: cargo make fmt-check
- run: cargo make clippy
- run: cargo make deny-check
- run: cargo make docs
test:
# Avoid duplicate jobs on PR from a branch on the same repo
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install 1.72.0
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-make
- run: cargo make test
alls-green:
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- run: ${{ !contains(needs.*.result, 'failure') }}