mirror of
https://github.com/immich-app/walkrs.git
synced 2026-09-30 13:32:57 +08:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Test
|
|
|
|
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, test
|
|
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 rust linting
|
|
run: pnpm rust:lint
|
|
if: ${{ !cancelled() }}
|
|
- name: Check rust formatting
|
|
run: pnpm rust:format
|
|
if: ${{ !cancelled() }}
|
|
- name: Run Rust tests
|
|
run: cargo test
|
|
if: ${{ !cancelled() }}
|
|
- name: Check ts linting
|
|
run: pnpm ts:lint
|
|
if: ${{ !cancelled() }}
|
|
- name: Check ts formatting
|
|
run: pnpm ts:format
|
|
if: ${{ !cancelled() }}
|
|
- name: Build
|
|
run: pnpm build
|
|
if: ${{ !cancelled() }}
|
|
- name: Run tests
|
|
run: pnpm test
|
|
if: ${{ !cancelled() }}
|