feat: Workspace improvements for agents #7897
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: build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version-file: ".node-version" | |
| cache: true | |
| - name: Install Dependencies | |
| run: vp install | |
| - name: Lint packages | |
| run: vp lint | |
| - name: Build packages | |
| run: vp run -r build | |
| - name: Run unit tests | |
| run: vp run -r test | |
| - name: Run Next.js integration test (production build) | |
| run: NEXTJS_TEST_MODE=build vp test run src/unit/nextjs/serverUtil.test.ts | |
| working-directory: tests | |
| - name: Upload webpack stats artifact (editor) | |
| uses: relative-ci/agent-upload-artifact-action@v2 | |
| with: | |
| webpackStatsFile: ./playground/dist/webpack-stats.json | |
| artifactName: relative-ci-artifacts-editor | |
| - name: Soft release | |
| id: soft-release | |
| run: vp dlx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact | |
| playwright-build: | |
| name: "Playwright Build" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version-file: ".node-version" | |
| cache: true | |
| - name: Install dependencies | |
| run: vp install | |
| - name: Build packages | |
| run: vp run -r build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-build | |
| path: | | |
| packages/*/dist | |
| playground/dist | |
| retention-days: 1 | |
| playwright: | |
| name: "Playwright Tests - ${{ matrix.browser }} (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})" | |
| runs-on: ubuntu-latest | |
| needs: playwright-build | |
| timeout-minutes: 30 | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.51.1-noble | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| browser: [chromium, firefox, webkit] | |
| shardIndex: [1, 2] | |
| shardTotal: [2] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version-file: ".node-version" | |
| cache: true | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: playwright-build | |
| - name: Install dependencies | |
| run: vp install | |
| - name: Run server and Playwright tests | |
| run: | | |
| HOME=/root vp exec concurrently --success=first -r --kill-others \ | |
| "vp run --filter @blocknote/example-editor preview" \ | |
| "wait-on http://localhost:3000 && cd tests && vp exec playwright test --project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" | |
| - name: Upload blob report | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: blob-report-${{ matrix.browser }}-${{ matrix.shardIndex }} | |
| path: tests/blob-report/ | |
| retention-days: 1 | |
| - name: Upload HTML report | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report-${{ matrix.browser }}-${{ matrix.shardIndex }} | |
| path: tests/playwright-report/ | |
| retention-days: 30 | |
| merge-reports: | |
| name: "Merge Playwright Reports" | |
| if: ${{ !cancelled() }} | |
| needs: playwright | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version-file: ".node-version" | |
| cache: true | |
| - name: Install dependencies | |
| run: vp install | |
| - name: Download blob reports | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: tests/all-blob-reports | |
| pattern: blob-report-* | |
| merge-multiple: true | |
| - name: Merge reports | |
| run: vp exec playwright merge-reports --reporter html ./all-blob-reports | |
| working-directory: tests | |
| - name: Upload merged HTML report | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report-merged | |
| path: tests/playwright-report/ | |
| retention-days: 30 |