Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Pull Request Validation

on:
pull_request:

concurrency:
group: pr-validation-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read

jobs:
frontend:
name: Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 24
package-manager-cache: false

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install frontend dependencies
run: pnpm install --frozen-lockfile

- name: Build frontend
run: pnpm build

- name: Run frontend tests
run: pnpm test

rust:
name: Rust tests and format
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Check changed Rust formatting
shell: bash
env:
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
mapfile -t files < <(git diff --name-only --diff-filter=ACMR "$BASE_SHA" "$HEAD_SHA" -- 'src-tauri/**/*.rs')
if (( ${#files[@]} )); then
rustfmt --edition 2021 --check --config skip_children=true "${files[@]}"
fi

- name: Run Rust tests
run: cargo test --locked --manifest-path src-tauri/Cargo.toml

platform-check:
name: Platform compile (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Compile platform-specific Rust
run: cargo check --locked --manifest-path src-tauri/Cargo.toml
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"release": "node scripts/release.mjs",
"release:patch": "node scripts/release.mjs patch",
"release:minor": "node scripts/release.mjs minor",
"release:major": "node scripts/release.mjs major"
"release:major": "node scripts/release.mjs major",
"test": "node --experimental-strip-types --test tests/*.test.*"
},
"dependencies": {
"@tauri-apps/api": "^2.10.0",
Expand Down
Loading