62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint-crates:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: gitea.gwmc.dev/finwise/finwise-ci:latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust, checkout and restore caches
|
|
uses: ./.github/actions/setup-rust
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy --all-features
|
|
|
|
- name: Check code formatting
|
|
run: |
|
|
cd src-tauri
|
|
cargo fmt -- --check
|
|
|
|
lint-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pnpm install
|
|
|
|
- name: Run frontend linter
|
|
run: |
|
|
pnpm lint
|
|
|