-
Notifications
You must be signed in to change notification settings - Fork 13
79 lines (70 loc) · 2.03 KB
/
ci.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: ci
on:
workflow_call:
workflow_dispatch:
pull_request:
paths-ignore:
- ".github/**"
- "docs/**"
- "README.md"
concurrency:
# Support push/pr as event types with different behaviors each:
# 1. push: queue up builds
# 2. pr: only allow one run per PR
group: ${{ github.workflow }}-${{ github.event_name }}${{ github.event.pull_request.number }}
# If there is already a workflow running for the same pull request, cancel it
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
tasks:
name: "${{ matrix.cargo.name }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cargo:
- name: "Clippy"
cmd: clippy
args: --workspace --all-features --all-targets -- -D warnings
rust: stable
- name: "Formatting"
cmd: fmt
args: --all -- --check
rust: nightly
- name: "Tests"
cmd: nextest
args: run --workspace --all-features
rust: stable
- name: "Documentation Tests"
cmd: test
args: --workspace --doc --all-features
rust: stable
env:
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v3
# Install Rust toolchain
- name: "Install Rust ${{ matrix.cargo.rust }}"
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.cargo.rust }}
profile: default
override: true
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v1
with:
tool: nextest
- name: "Cargo ${{ matrix.cargo.name }}"
uses: actions-rs/cargo@v1
with:
command: ${{ matrix.cargo.cmd }}
args: ${{ matrix.cargo.args }}
misspell:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"