87 lines
2 KiB
YAML
87 lines
2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
paths-ignore:
|
|
- 'packages/docs/**'
|
|
- 'openspec/**'
|
|
- '*.md'
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: ./.github/actions/setup-bun
|
|
with:
|
|
lfs: 'true'
|
|
|
|
- name: Format check
|
|
run: bun run format:check
|
|
|
|
- name: Lint, typecheck, architecture, package, and tooling checks
|
|
run: bun run check
|
|
|
|
- name: Build Storybook
|
|
run: bun run build-storybook
|
|
|
|
native-test-contracts:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: desktop -> target
|
|
key: native-test
|
|
|
|
- name: Install Tauri dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
|
|
|
|
- uses: ./.github/actions/setup-bun
|
|
|
|
- name: Typecheck native tests
|
|
run: bun run check:native-test
|
|
|
|
- name: Check test-only Tauri feature
|
|
run: cargo check --manifest-path desktop/Cargo.toml --features native-test
|
|
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
group: [app, dom, editor, fig, render, scene, vue]
|
|
name: Unit tests (${{ matrix.group }})
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: ./.github/actions/setup-bun
|
|
with:
|
|
lfs: 'true'
|
|
|
|
- name: Build packages
|
|
run: bun run build:packages
|
|
|
|
- name: Run quick unit test shard
|
|
shell: bash
|
|
run: |
|
|
mapfile -t test_files < <(bun tools/unit-tests/src/list.ts "${{ matrix.group }}")
|
|
if [ "${#test_files[@]}" -eq 0 ]; then
|
|
echo "No tests found for shard ${{ matrix.group }}"
|
|
exit 0
|
|
fi
|
|
bun test "${test_files[@]}"
|
|
env:
|
|
BUN_HEAVY_TESTS: 'false'
|