Build production regression prevention framework #7
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: Additional workspace tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main, master, develop] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| workspace-tests: | |
| name: ${{ matrix.suite }} execution complete | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: [workspace-unit, workspace-runtime, server-colocated] | |
| env: | |
| VITEST_SEED: '20260610' | |
| STORAGE_S3_ENDPOINT: http://127.0.0.1:59000 | |
| STORAGE_S3_REGION: us-east-1 | |
| STORAGE_S3_BUCKET: alga-regression-bundles | |
| STORAGE_S3_ACCESS_KEY: regression-test | |
| STORAGE_S3_SECRET_KEY: regression-test-password | |
| STORAGE_S3_FORCE_PATH_STYLE: 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - run: npm install -g npm@11 | |
| - run: npm ci | |
| - name: Verify runner refuses incomplete execution | |
| if: matrix.suite == 'workspace-unit' | |
| run: node --test scripts/tests/additional-workspace-runner.test.mjs | |
| - name: Start disposable object storage | |
| if: matrix.suite == 'workspace-runtime' | |
| shell: bash | |
| run: | | |
| docker run -d --name workspace-test-minio \ | |
| -p 127.0.0.1:59000:9000 \ | |
| -e MINIO_ROOT_USER=regression-test \ | |
| -e MINIO_ROOT_PASSWORD=regression-test-password \ | |
| minio/minio:RELEASE.2025-04-22T22-12-26Z server /data | |
| for ((attempt = 1; attempt <= 60; attempt++)); do | |
| if curl --fail --silent http://127.0.0.1:59000/minio/health/ready; then exit 0; fi | |
| sleep 1 | |
| done | |
| docker logs workspace-test-minio | |
| exit 1 | |
| - name: Collect, execute and reconcile every required test | |
| run: node scripts/run-additional-workspace-tests.mjs ${{ matrix.suite }} | |
| - name: Retain execution evidence and first-failure progress | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.suite }}-${{ github.sha }} | |
| path: test-results/${{ matrix.suite }}/ | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Stop disposable object storage | |
| if: always() && matrix.suite == 'workspace-runtime' | |
| run: docker rm -f workspace-test-minio | |
| enterprise-unit: | |
| name: Enterprise unit shard ${{ matrix.shard }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2, 3] | |
| env: | |
| WORKSPACE_SHARD_INDEX: ${{ matrix.shard }} | |
| WORKSPACE_SHARD_TOTAL: '3' | |
| NODE_OPTIONS: '--max-old-space-size=8192' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - run: npm install -g npm@11 | |
| - run: npm ci | |
| - name: Collect, execute and reconcile assigned EE unit tests | |
| run: node scripts/run-additional-workspace-tests.mjs enterprise-unit | |
| - name: Retain EE unit execution evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: enterprise-unit-shard-${{ matrix.shard }} | |
| path: test-results/enterprise-unit/shard-${{ matrix.shard }}/ | |
| if-no-files-found: error | |
| retention-days: 30 | |
| enterprise-unit-complete: | |
| name: Enterprise unit execution complete | |
| needs: enterprise-unit | |
| if: always() | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| env: | |
| WORKSPACE_SHARD_TOTAL: '3' | |
| WORKSPACE_JOB_RESULT: ${{ needs.enterprise-unit.result }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: enterprise-unit-shard-* | |
| path: test-results/enterprise-unit-shards | |
| - name: Verify every EE unit partition and assertion | |
| if: always() | |
| run: node scripts/verify-enterprise-unit-shards.mjs | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: enterprise-unit-execution-evidence | |
| path: test-results/enterprise-unit/aggregate.json | |
| if-no-files-found: error | |
| retention-days: 30 |