-
-
Notifications
You must be signed in to change notification settings - Fork 41
35 lines (34 loc) · 1011 Bytes
/
testing.yml
File metadata and controls
35 lines (34 loc) · 1011 Bytes
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
name: "Testing"
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
features: ["--all-features", "--no-default-features"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install dependencies (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y libdbus-1-dev
- name: Set toolchain version
run: |
rustup override set 1.85
rustup component add rustfmt
- name: cargo check
run: cargo check ${{ matrix.features }}
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: |
rustup component add clippy
cargo clippy -- -D warnings
- name: cargo test
run: cargo test ${{ matrix.features }}