mirror of
https://github.com/immich-app/walkrs.git
synced 2026-09-30 13:32:57 +08:00
41 lines
1015 B
YAML
41 lines
1015 B
YAML
name: Lint & Format
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
format-lint:
|
|
name: Lint & Format
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9
|
|
with:
|
|
toolchain: stable
|
|
components: clippy, rustfmt
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Check linting
|
|
run: pnpm rust:lint
|
|
if: ${{ !cancelled() }}
|
|
- name: Check formatting
|
|
run: pnpm rust:format
|
|
if: ${{ !cancelled() }}
|