-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (59 loc) · 1.71 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
name: CI
on:
push:
branches: [ master, develop, release/* ]
pull_request:
branches: [ master, release/* ]
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
RUST_TOOLCHAIN: 1.70.0
jobs:
rustfmt:
name: Checks / Format
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component rustfmt
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Format Check
run: cargo fmt --all -- --check
clippy:
name: Checks / Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component clippy
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Lint Check
run: cargo clippy --workspace --tests -- --deny warnings
test:
name: Tests / Build & Test
needs: [ rustfmt, clippy ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: true
max-parallel: 3
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Build
run: cargo build --workspace
- name: Unit Testing
run: cargo test --workspace