-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 891 Bytes
/
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
on:
pull_request:
push:
branches:
- main
name: CI
jobs:
check:
name: ${{ matrix.target_name }} (check, clippy)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target_name: Linux
os: ubuntu-latest
- target_name: macOS
os: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust toolchains
run: |
rustup toolchain install nightly --profile minimal --component rustfmt
rustup toolchain install stable --profile minimal --component clippy
- name: Run cargo fmt
env:
TERM: xterm-256color
run: |
cargo +nightly fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy
- name: Run cargo test
run: cargo test