mirror of
https://github.com/popcorn-official/popcorn-desktop.git
synced 2026-09-30 14:15:42 +02:00
50 lines
989 B
YAML
50 lines
989 B
YAML
name: Lint Rust
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- Cargo.lock
|
|
- ".github/workflows/lint-rust.yaml"
|
|
- "crates/**"
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_PROFILE_DEV_DEBUG: 0
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: ./.github/actions/init-env-linux
|
|
|
|
- name: install rust stable and clippy
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|
|
|
|
rustfmt:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: install Rust stable and rustfmt
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: run cargo fmt
|
|
run: cargo fmt --all -- --check
|