yazi/.github/workflows/check.yml
Mika Vilpas f0108dba40
ci: consistently enforce Lua coding style (#1029)
Co-authored-by: 三咲雅 · Misaki Masa <sxyazi@gmail.com>
2024-05-15 10:54:20 +08:00

52 lines
1.1 KiB
YAML

name: Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup component add clippy
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust toolchain
run: |
rustup toolchain install nightly --profile minimal
rustup component add rustfmt --toolchain nightly
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Rustfmt
run: cargo +nightly fmt --all -- --check
stylua:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check .