Fix cleanup guard behavior and standardize workspace check scripts #135
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: Pull Request | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - .attachments/** | |
| - AGENTS.md | |
| - CLAUDE.md | |
| - GEMINI.md | |
| - README.md | |
| - CODE_OF_CONDUCT.md | |
| - LICENSE | |
| - SECURITY.md | |
| - doc/** | |
| - .github/workflows/deploy-doc.yml | |
| - .github/workflows/pull-request-doc.yml | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| release-preflight: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| cache: "false" | |
| install: "false" | |
| - name: Run npm release preflight | |
| uses: ./.github/actions/check-release-state | |
| with: | |
| registry-url: https://registry.npmjs.org/ | |
| gui-release-preflight: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run GUI release preflight | |
| uses: ./.github/actions/check-gui-release-state | |
| with: | |
| github-token: ${{ github.token }} | |
| build: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: Build | |
| run: pnpm run build | |
| lint: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: Lint | |
| run: pnpm run lint | |
| check-type: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: Typecheck | |
| run: pnpm run check:type | |
| test: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: Build | |
| run: pnpm run build | |
| - name: Run all tests | |
| run: pnpm run test | |
| test-sdk: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: SDK tests | |
| run: pnpm turbo test --filter=@truenine/memory-sync-sdk | |
| test-cli: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: CLI tests | |
| run: pnpm turbo test --filter=@truenine/memory-sync-cli | |
| test-mcp: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: MCP tests | |
| run: pnpm turbo test --filter=@truenine/memory-sync-mcp | |
| test-libraries: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Build native modules | |
| run: pnpm run build:native | |
| - name: Library tests | |
| run: pnpm turbo test --filter=@truenine/logger --filter=@truenine/md-compiler --filter=@truenine/script-runtime | |
| test-rust: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: pr | |
| - name: Rust tests (excluding GUI) | |
| run: cargo test --workspace --exclude memory-sync-gui --lib --bins --tests |