Repository navigation
Responsive shell, theming system, and empty workspace create #38
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test (Ubuntu) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10.33.3 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm rebuild better-sqlite3 | |
| - run: pnpm test | |
| desktop: | |
| name: Desktop ${{ matrix.platform }} | |
| needs: test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: ubuntu-22.04 | |
| args: --target x86_64-unknown-linux-gnu | |
| rust_target: x86_64-unknown-linux-gnu | |
| artifact: desktop-linux-x86_64 | |
| - platform: macos-latest | |
| args: --target aarch64-apple-darwin | |
| rust_target: aarch64-apple-darwin | |
| artifact: desktop-macos-aarch64 | |
| - platform: windows-latest | |
| args: --target x86_64-pc-windows-msvc | |
| rust_target: x86_64-pc-windows-msvc | |
| artifact: desktop-windows-x86_64 | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10.33.3 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install Linux WebKit deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust_target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: apps/desktop/src-tauri -> target | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm rebuild better-sqlite3 | |
| - name: Bundle API sidecar + Node | |
| run: node apps/desktop/scripts/bundle-api-sidecar.mjs --node | |
| env: | |
| PRM_BUNDLE_NODE: "1" | |
| - uses: tauri-apps/tauri-action@v0 | |
| id: tauri | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| projectPath: apps/desktop | |
| args: ${{ matrix.args }} | |
| includeUpdaterJson: false | |
| - name: Smoke API sidecar | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| SIDE="apps/desktop/src-tauri/sidecars" | |
| UI="apps/desktop/src-tauri/ui-dist" | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| NODE="$SIDE/node.exe" | |
| else | |
| NODE="$SIDE/node" | |
| chmod +x "$NODE" || true | |
| fi | |
| test -f "$NODE" | |
| test -f "$SIDE/prm-api.mjs" | |
| test -f "$UI/index.html" | |
| DATA="${RUNNER_TEMP:-/tmp}/prm-sidecar-smoke" | |
| rm -rf "$DATA" | |
| mkdir -p "$DATA" | |
| PRM_DATA_DIR="$DATA" PRM_PORT=8799 PRM_LAUNCH_TOKEN=ci-smoke PRM_UI_DIR="$UI" \ | |
| "$NODE" "$SIDE/prm-api.mjs" >"$DATA/out.log" 2>&1 & | |
| PID=$! | |
| cleanup() { kill "$PID" 2>/dev/null || true; } | |
| trap cleanup EXIT | |
| for i in $(seq 1 50); do | |
| if curl -sf "http://127.0.0.1:8799/api/health" >/dev/null; then | |
| echo "sidecar healthy" | |
| curl -sf "http://127.0.0.1:8799/api/workspace/status" -H "x-prm-launch-token: ci-smoke" | |
| echo | |
| curl -sf "http://127.0.0.1:8799/" | head -c 200 | |
| echo | |
| exit 0 | |
| fi | |
| sleep 0.2 | |
| done | |
| echo "sidecar failed to become healthy" >&2 | |
| cat "$DATA/out.log" >&2 || true | |
| exit 1 | |
| - name: Upload desktop installers | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: apps/desktop/src-tauri/target/${{ matrix.rust_target }}/release/bundle/ | |
| if-no-files-found: error | |
| retention-days: 30 |