-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (50 loc) · 1.35 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
42
43
44
45
46
47
48
49
50
name: CI
on: [pull_request, push]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Ensure style.css exists
run: touch assets/style.css
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Configure cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov (for use in tests)
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Test
run: cargo test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Ensure style.css exists
run: touch assets/style.css
- name: Setup Rust (nightly)
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run rustfmt
run: cargo fmt -- --check
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Configure cache
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy -- -D warnings