Check & Format #212
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check & Format | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
check: | |
name: Rust & TypeScript Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: | | |
make frontend_preinstall | |
make frontend | |
sudo bash scripts/install_tauri_deps.sh | |
- name: TypeScript Check | |
run: | | |
pnpm -C frontend check | |
- name: Prettier Check | |
run: | | |
pnpm -C frontend fmt:check | |
- name: Clippy Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --workspace -- -D warnings | |
- name: Rustfmt Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check |