Skip to content

fix(cli-manager): include exe parent dir in PATH for version probe (#… #1

fix(cli-manager): include exe parent dir in PATH for version probe (#…

fix(cli-manager): include exe parent dir in PATH for version probe (#… #1

Workflow file for this run

name: ci
on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]
permissions:
contents: read
jobs:
pr-title:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check PR title (Conventional Commits)
shell: bash
run: |
title="${{ github.event.pull_request.title }}"
echo "PR title: $title"
pattern='^(feat|fix|docs|chore|style|refactor|perf|test|ci|build|chore|revert)(\([^)]+\))?: .+'
if [[ ! "$title" =~ $pattern ]]; then
echo "::error::Invalid PR title. Expected Conventional Commits, e.g. 'feat(ui): add updater dialog'."
echo "::error::Pattern: $pattern"
exit 1
fi
support-contract:
runs-on: ubuntu-latest
outputs:
desktop_matrix: ${{ steps.matrix.outputs.desktop_matrix }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
- id: matrix
name: Load desktop support matrix
shell: bash
run: |
set -euo pipefail
echo "desktop_matrix=$(node scripts/support-matrix.mjs ci-matrix)" >> "$GITHUB_OUTPUT"
- name: Validate support matrix contract
run: node scripts/support-matrix.mjs check
desktop-support-contract:
needs: support-contract
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.support-contract.outputs.desktop_matrix) }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
- name: Validate support matrix on ${{ matrix.os_family }}
run: pnpm check:support-matrix
frontend:
needs: support-contract
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: pnpm
- name: Install system deps (Tauri/Linux)
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev librsvg2-dev patchelf
# AppIndicator (Ubuntu 22.04 typically uses ayatana; some images still provide appindicator)
if ! sudo apt-get install -y libayatana-appindicator3-dev; then
sudo apt-get install -y libappindicator3-dev
fi
# WebKit2GTK + libsoup (Ubuntu images vary: 4.1/4.0 + soup3/soup2)
if ! sudo apt-get install -y libwebkit2gtk-4.1-dev libsoup-3.0-dev; then
sudo apt-get install -y libwebkit2gtk-4.0-dev libsoup2.4-dev
fi
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Support matrix drift check
run: pnpm check:support-matrix
- name: Dependency audit (high+ severity)
run: pnpm audit:deps
- name: Lint (ESLint)
run: pnpm lint
- name: Gateway error codes sync check
run: pnpm check:gateway-error-codes
- name: Plugin docs contract
run: pnpm check:plugin-system-docs
- name: Plugin API contract
run: pnpm check:plugin-api-contract
- name: Generated IPC bindings contract
run: pnpm check:generated-bindings
- name: Plugin TypeScript SDK typecheck
run: pnpm plugin-sdk:typecheck
- name: Plugin scaffolder tests
run: pnpm create-aio-plugin:test
- name: Plugin GUI E2E smoke
run: pnpm test:e2e
- name: Unit tests (Vitest + coverage gate)
run: pnpm test:unit:coverage
- name: Build frontend
run: pnpm build
rust:
needs: support-contract
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install system deps (Tauri/Linux)
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev librsvg2-dev patchelf
# AppIndicator (Ubuntu 22.04 typically uses ayatana; some images still provide appindicator)
if ! sudo apt-get install -y libayatana-appindicator3-dev; then
sudo apt-get install -y libappindicator3-dev
fi
# WebKit2GTK + libsoup (Ubuntu images vary: 4.1/4.0 + soup3/soup2)
if ! sudo apt-get install -y libwebkit2gtk-4.1-dev libsoup-3.0-dev; then
sudo apt-get install -y libwebkit2gtk-4.0-dev libsoup2.4-dev
fi
- name: Install Rust 1.90.0
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: 1.90.0
components: rustfmt, clippy
- name: Rust cache
uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
with:
workspaces: src-tauri
- name: Rust fmt
working-directory: src-tauri
run: cargo fmt -- --check
- name: Sync Cargo.lock (for release-please version bumps)
working-directory: src-tauri
run: cargo update --workspace
# release-please PRs have a dedicated workflow that commits Cargo.lock
# after version bumps. Skip the committed-file check here to avoid a
# race where CI runs before that sync workflow pushes its follow-up commit.
- name: Verify Cargo.lock is committed
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'release-please--') }}
shell: bash
run: |
set -euo pipefail
if git diff --quiet -- src-tauri/Cargo.lock; then
exit 0
fi
echo "src-tauri/Cargo.lock is out of date." >&2
echo "Run 'cd src-tauri && cargo update --workspace' and commit the result." >&2
git diff -- src-tauri/Cargo.lock
exit 1
- name: Rust clippy
working-directory: src-tauri
run: cargo clippy --all-targets --locked -- -D warnings
- name: Plugin WASM SDK tests
run: |
cargo test --manifest-path packages/plugin-wasm-sdk/Cargo.toml
cargo test --manifest-path packages/plugin-wasm-sdk/examples/redactor/Cargo.toml
- name: Rust test
working-directory: src-tauri
run: cargo test --locked -- --test-threads=1
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Dependency audit (cargo)
working-directory: src-tauri
run: cargo audit