-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (33 loc) · 1.01 KB
/
rust.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
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
# Rust fmt
fmt:
if: github.event.pull_request.draft == false
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
- uses: actions/checkout@v3
- run: cargo fmt --all -- --check
# Clippy
clippy:
if: github.event.pull_request.draft == false
name: Clippy
runs-on: windows-latest
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup target add wasm32-unknown-unknown
- run: rustup component add clippy
- uses: actions/checkout@v3
- run: cargo clippy --package dioxus-sdk --target wasm32-unknown-unknown --tests --features wasm-testing -- -D warnings
- run: cargo clippy --package dioxus-sdk --tests --features desktop-testing -- -D warnings