-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.09 KB
/
tests.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
name: "Tests"
on:
push:
branches: ["main"]
paths:
- "crates/**"
- "Cargo.toml"
- "Cargo.lock"
pull_request:
branches: ["main"]
types: [ready_for_review, opened, synchronize]
paths:
- "crates/**"
- "Cargo.toml"
- "Cargo.lock"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Rust:
name: "Test"
strategy:
matrix:
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
cache: true
- name: Build Project
run: cargo build --all
- name: Run Tests
run: cargo test --all
- name: Run Clippy
run: cargo clippy --all -- -D warnings
- name: Run Rustfmt
run: cargo fmt --all --check