Skip to content

Update App icon in the top. #5

Update App icon in the top.

Update App icon in the top. #5

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
RUST_BACKTRACE: 1
jobs:
test:
name: Test Suite
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
rust_target: aarch64-apple-darwin
- os: ubuntu-22.04
rust_target: x86_64-unknown-linux-gnu
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install frontend dependencies
run: pnpm install
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust_target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Run Rust tests
run: |
cd src-tauri
cargo test --release
- name: Check Rust formatting
run: |
cd src-tauri
cargo fmt -- --check
- name: Run Clippy
run: |
cd src-tauri
cargo clippy -- -D warnings
- name: Build frontend
run: pnpm build
- name: Build Tauri app (smoke test)
run: |
cd src-tauri
cargo build --release
frontend-lint:
name: Frontend Linting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Check formatting (if prettier is configured)
run: |
if [ -f ".prettierrc" ] || [ -f "prettier.config.js" ]; then
pnpm prettier --check .
else
echo "No prettier config found, skipping formatting check"
fi
- name: Run ESLint (if configured)
run: |
if [ -f ".eslintrc.json" ] || [ -f ".eslintrc.js" ]; then
pnpm eslint . --ext .js,.jsx,.ts,.tsx
else
echo "No ESLint config found, skipping linting"
fi