Rootline by baole.space v2 #3
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": | |
| pull_request: | |
| push: | |
| branches: [main, master] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| typescript-quality: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm audit --prod --audit-level high | |
| - run: pnpm lint | |
| - run: pnpm typecheck | |
| - run: pnpm test:unit | |
| - run: pnpm build | |
| - run: pnpm test:release | |
| npm-tarball-smoke: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm --filter folder-structure-sync test:pack | |
| api-image-smoke: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm test:api-image | |
| postgres-integration: | |
| runs-on: ubuntu-24.04 | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: rootline | |
| POSTGRES_PASSWORD: rootline | |
| POSTGRES_DB: rootline_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U rootline -d rootline_test" | |
| --health-interval 2s | |
| --health-timeout 5s | |
| --health-retries 30 | |
| env: | |
| DATABASE_URL: postgresql://rootline:rootline@127.0.0.1:5432/rootline_test?schema=public | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Install Tauri system dependencies for the native PostgreSQL seam | |
| run: sudo apt-get update && sudo apt-get install --yes libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| workspaces: apps/desktop/src-tauri | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build:workspace-deps | |
| - run: pnpm --filter @rootline/api prisma:generate | |
| - run: pnpm --filter @rootline/api prisma:migrate:deploy | |
| - run: pnpm --filter @rootline/api test:e2e | |
| rust: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Install Tauri system dependencies | |
| run: sudo apt-get update && sudo apt-get install --yes libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| workspaces: apps/desktop/src-tauri | |
| - run: cargo fmt --check --manifest-path apps/desktop/src-tauri/Cargo.toml | |
| - run: cargo clippy --manifest-path apps/desktop/src-tauri/Cargo.toml --all-targets --all-features -- -D warnings | |
| - run: cargo test --manifest-path apps/desktop/src-tauri/Cargo.toml | |
| tauri-build: | |
| name: Tauri ${{ matrix.label }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: macOS Universal | |
| runner: macos-15 | |
| target: universal-apple-darwin | |
| - label: Windows x64 | |
| runner: windows-2025 | |
| target: x86_64-pc-windows-msvc | |
| - label: Windows ARM64 | |
| runner: windows-11-arm | |
| target: aarch64-pc-windows-msvc | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable | |
| with: | |
| targets: ${{ matrix.target == 'universal-apple-darwin' && 'aarch64-apple-darwin,x86_64-apple-darwin' || matrix.target }} | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| workspaces: apps/desktop/src-tauri | |
| - run: pnpm install --frozen-lockfile | |
| - name: Run Windows filesystem adapter tests | |
| if: runner.os == 'Windows' && matrix.target == 'x86_64-pc-windows-msvc' | |
| shell: pwsh | |
| run: | | |
| pnpm --filter folder-structure-sync test | |
| if ($LASTEXITCODE -ne 0) { throw "Node filesystem adapter tests failed on Windows." } | |
| cargo test --manifest-path apps/desktop/src-tauri/Cargo.toml | |
| if ($LASTEXITCODE -ne 0) { throw "Rust filesystem adapter tests failed on Windows." } | |
| - run: pnpm --filter @rootline/desktop tauri build --target ${{ matrix.target }} --no-bundle |