From dcd5fe2093c723ce8f7d88281a8e606ab34c87f2 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 14:52:03 +0000 Subject: [PATCH 01/15] feat(ci): implement Vitest shards for e2e workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split e2e tests across 5 parallel runners using matrix strategy - Add merge-reports job to combine shard results - Maintain single e2e check for branch protection compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 118 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4df9ada9e3..cfe8a3af2c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,9 +13,117 @@ concurrency: cancel-in-progress: true jobs: - e2e: - uses: ./.github/workflows/run.yml - secrets: inherit + e2e-shards: + runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - with: - cmd: pnpm run setup && pnpm test:e2e + strategy: + matrix: + shard: [1, 2, 3, 4, 5] + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: Collect versions + run: | + echo "nodejs_version=$(cat .tool-versions | grep 'nodejs' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" + echo "pnpm_version=$(cat .tool-versions | grep 'pnpm' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.pnpm_version }} + + - uses: actions/setup-node@v5 + with: + node-version: ${{ env.nodejs_version }} + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Setup and run e2e shard ${{ matrix.shard }} + run: | + set -eux + pnpm run setup + cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + INFERENCE_NET_API_KEY: ${{ secrets.INFERENCE_NET_API_KEY }} + TOGETHER_AI_API_KEY: ${{ secrets.TOGETHER_AI_API_KEY }} + GOOGLE_AI_STUDIO_API_KEY: ${{ secrets.GOOGLE_AI_STUDIO_API_KEY }} + CLOUD_RIFT_API_KEY: ${{ secrets.CLOUD_RIFT_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + X_AI_API_KEY: ${{ secrets.X_AI_API_KEY }} + GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} + DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} + PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} + NOVITA_AI_API_KEY: ${{ secrets.NOVITA_AI_API_KEY }} + MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }} + ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }} + NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }} + Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }} + ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} + + - name: Upload shard results + uses: actions/upload-artifact@v5 + with: + name: e2e-results-${{ matrix.shard }} + path: e2e-results-${{ matrix.shard }}.blob + retention-days: 1 + + merge-reports: + runs-on: ubuntu-latest + needs: e2e-shards + if: always() + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: Collect versions + run: | + echo "nodejs_version=$(cat .tool-versions | grep 'nodejs' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" + echo "pnpm_version=$(cat .tool-versions | grep 'pnpm' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.pnpm_version }} + + - uses: actions/setup-node@v5 + with: + node-version: ${{ env.nodejs_version }} + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Download all shard results + uses: actions/download-artifact@v5 + with: + path: ./e2e-results + pattern: e2e-results-* + + - name: Merge reports + run: | + # Move all .blob files to root directory + find ./e2e-results -name "*.blob" -exec mv {} ./ \; + # Merge reports + cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --merge-reports + + e2e: + runs-on: ubuntu-latest + needs: [e2e-shards, merge-reports] + if: always() + steps: + - name: Check shard results + run: | + if [[ "${{ needs.e2e-shards.result }}" == "success" && "${{ needs.merge-reports.result }}" == "success" ]]; then + echo "All e2e tests passed" + exit 0 + else + echo "E2E tests failed" + exit 1 + fi From a40bd298314db9f8a52b89121d67b62357877a73 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 15:18:14 +0000 Subject: [PATCH 02/15] fix(ci): update e2e workflow to use run.yml and fix versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Enhanced run.yml to support artifact uploading with optional parameters - Fixed artifact action version from v5 to v4 - Reused run.yml workflow for all shard jobs to reduce duplication - Maintained proper artifact sharing for merge-reports functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 127 +++++++++++++++++++------------------- .github/workflows/run.yml | 18 ++++++ 2 files changed, 83 insertions(+), 62 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cfe8a3af2c..96fd33e609 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,69 +13,59 @@ concurrency: cancel-in-progress: true jobs: - e2e-shards: - runs-on: ubuntu-latest + e2e-shard-1: + uses: ./.github/workflows/run.yml + secrets: inherit if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - strategy: - matrix: - shard: [1, 2, 3, 4, 5] - steps: - - name: Checkout - uses: actions/checkout@v5 - with: - persist-credentials: false - - - name: Collect versions - run: | - echo "nodejs_version=$(cat .tool-versions | grep 'nodejs' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" - echo "pnpm_version=$(cat .tool-versions | grep 'pnpm' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" - - - uses: pnpm/action-setup@v4 - with: - version: ${{ env.pnpm_version }} - - - uses: actions/setup-node@v5 - with: - node-version: ${{ env.nodejs_version }} - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Setup and run e2e shard ${{ matrix.shard }} - run: | - set -eux - pnpm run setup - cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - INFERENCE_NET_API_KEY: ${{ secrets.INFERENCE_NET_API_KEY }} - TOGETHER_AI_API_KEY: ${{ secrets.TOGETHER_AI_API_KEY }} - GOOGLE_AI_STUDIO_API_KEY: ${{ secrets.GOOGLE_AI_STUDIO_API_KEY }} - CLOUD_RIFT_API_KEY: ${{ secrets.CLOUD_RIFT_API_KEY }} - MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} - X_AI_API_KEY: ${{ secrets.X_AI_API_KEY }} - GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} - DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} - PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} - NOVITA_AI_API_KEY: ${{ secrets.NOVITA_AI_API_KEY }} - MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }} - ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }} - NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }} - Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }} - ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} - - - name: Upload shard results - uses: actions/upload-artifact@v5 - with: - name: e2e-results-${{ matrix.shard }} - path: e2e-results-${{ matrix.shard }}.blob - retention-days: 1 + with: + cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=1/5 --reporter=blob --outputFile=e2e-results-1.blob + upload_artifacts: true + artifact_name: e2e-results-1 + artifact_path: e2e-results-1.blob + + e2e-shard-2: + uses: ./.github/workflows/run.yml + secrets: inherit + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} + with: + cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=2/5 --reporter=blob --outputFile=e2e-results-2.blob + upload_artifacts: true + artifact_name: e2e-results-2 + artifact_path: e2e-results-2.blob + + e2e-shard-3: + uses: ./.github/workflows/run.yml + secrets: inherit + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} + with: + cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=3/5 --reporter=blob --outputFile=e2e-results-3.blob + upload_artifacts: true + artifact_name: e2e-results-3 + artifact_path: e2e-results-3.blob + + e2e-shard-4: + uses: ./.github/workflows/run.yml + secrets: inherit + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} + with: + cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=4/5 --reporter=blob --outputFile=e2e-results-4.blob + upload_artifacts: true + artifact_name: e2e-results-4 + artifact_path: e2e-results-4.blob + + e2e-shard-5: + uses: ./.github/workflows/run.yml + secrets: inherit + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} + with: + cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=5/5 --reporter=blob --outputFile=e2e-results-5.blob + upload_artifacts: true + artifact_name: e2e-results-5 + artifact_path: e2e-results-5.blob merge-reports: runs-on: ubuntu-latest - needs: e2e-shards + needs: [e2e-shard-1, e2e-shard-2, e2e-shard-3, e2e-shard-4, e2e-shard-5] if: always() steps: - name: Checkout @@ -101,7 +91,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Download all shard results - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v4 with: path: ./e2e-results pattern: e2e-results-* @@ -115,12 +105,25 @@ jobs: e2e: runs-on: ubuntu-latest - needs: [e2e-shards, merge-reports] + needs: + [ + e2e-shard-1, + e2e-shard-2, + e2e-shard-3, + e2e-shard-4, + e2e-shard-5, + merge-reports, + ] if: always() steps: - name: Check shard results run: | - if [[ "${{ needs.e2e-shards.result }}" == "success" && "${{ needs.merge-reports.result }}" == "success" ]]; then + if [[ "${{ needs.e2e-shard-1.result }}" == "success" && \ + "${{ needs.e2e-shard-2.result }}" == "success" && \ + "${{ needs.e2e-shard-3.result }}" == "success" && \ + "${{ needs.e2e-shard-4.result }}" == "success" && \ + "${{ needs.e2e-shard-5.result }}" == "success" && \ + "${{ needs.merge-reports.result }}" == "success" ]]; then echo "All e2e tests passed" exit 0 else diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 4bfa8d3e63..8fe7b80ab6 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -6,6 +6,16 @@ on: cmd: required: true type: string + upload_artifacts: + required: false + type: boolean + default: false + artifact_name: + required: false + type: string + artifact_path: + required: false + type: string jobs: run: @@ -55,3 +65,11 @@ jobs: NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }} Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }} ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} + + - name: Upload artifacts + if: ${{ inputs.upload_artifacts == true }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact_name }} + path: ${{ inputs.artifact_path }} + retention-days: 1 From 07c526f71b25c029d8c7c1fae81dc638d90c47c7 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 16:11:03 +0000 Subject: [PATCH 03/15] Revert "fix(ci): update e2e workflow to use run.yml and fix versions" This reverts commit a40bd298314db9f8a52b89121d67b62357877a73. --- .github/workflows/e2e.yml | 127 +++++++++++++++++++------------------- .github/workflows/run.yml | 18 ------ 2 files changed, 62 insertions(+), 83 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 96fd33e609..cfe8a3af2c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,59 +13,69 @@ concurrency: cancel-in-progress: true jobs: - e2e-shard-1: - uses: ./.github/workflows/run.yml - secrets: inherit - if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - with: - cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=1/5 --reporter=blob --outputFile=e2e-results-1.blob - upload_artifacts: true - artifact_name: e2e-results-1 - artifact_path: e2e-results-1.blob - - e2e-shard-2: - uses: ./.github/workflows/run.yml - secrets: inherit - if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - with: - cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=2/5 --reporter=blob --outputFile=e2e-results-2.blob - upload_artifacts: true - artifact_name: e2e-results-2 - artifact_path: e2e-results-2.blob - - e2e-shard-3: - uses: ./.github/workflows/run.yml - secrets: inherit - if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - with: - cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=3/5 --reporter=blob --outputFile=e2e-results-3.blob - upload_artifacts: true - artifact_name: e2e-results-3 - artifact_path: e2e-results-3.blob - - e2e-shard-4: - uses: ./.github/workflows/run.yml - secrets: inherit - if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - with: - cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=4/5 --reporter=blob --outputFile=e2e-results-4.blob - upload_artifacts: true - artifact_name: e2e-results-4 - artifact_path: e2e-results-4.blob - - e2e-shard-5: - uses: ./.github/workflows/run.yml - secrets: inherit + e2e-shards: + runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} - with: - cmd: pnpm run setup && cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=5/5 --reporter=blob --outputFile=e2e-results-5.blob - upload_artifacts: true - artifact_name: e2e-results-5 - artifact_path: e2e-results-5.blob + strategy: + matrix: + shard: [1, 2, 3, 4, 5] + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: Collect versions + run: | + echo "nodejs_version=$(cat .tool-versions | grep 'nodejs' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" + echo "pnpm_version=$(cat .tool-versions | grep 'pnpm' | cut -d ' ' -f 2)" >> "$GITHUB_ENV" + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.pnpm_version }} + + - uses: actions/setup-node@v5 + with: + node-version: ${{ env.nodejs_version }} + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Setup and run e2e shard ${{ matrix.shard }} + run: | + set -eux + pnpm run setup + cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + INFERENCE_NET_API_KEY: ${{ secrets.INFERENCE_NET_API_KEY }} + TOGETHER_AI_API_KEY: ${{ secrets.TOGETHER_AI_API_KEY }} + GOOGLE_AI_STUDIO_API_KEY: ${{ secrets.GOOGLE_AI_STUDIO_API_KEY }} + CLOUD_RIFT_API_KEY: ${{ secrets.CLOUD_RIFT_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + X_AI_API_KEY: ${{ secrets.X_AI_API_KEY }} + GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} + DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} + PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} + NOVITA_AI_API_KEY: ${{ secrets.NOVITA_AI_API_KEY }} + MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }} + ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }} + NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }} + Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }} + ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} + + - name: Upload shard results + uses: actions/upload-artifact@v5 + with: + name: e2e-results-${{ matrix.shard }} + path: e2e-results-${{ matrix.shard }}.blob + retention-days: 1 merge-reports: runs-on: ubuntu-latest - needs: [e2e-shard-1, e2e-shard-2, e2e-shard-3, e2e-shard-4, e2e-shard-5] + needs: e2e-shards if: always() steps: - name: Checkout @@ -91,7 +101,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Download all shard results - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: path: ./e2e-results pattern: e2e-results-* @@ -105,25 +115,12 @@ jobs: e2e: runs-on: ubuntu-latest - needs: - [ - e2e-shard-1, - e2e-shard-2, - e2e-shard-3, - e2e-shard-4, - e2e-shard-5, - merge-reports, - ] + needs: [e2e-shards, merge-reports] if: always() steps: - name: Check shard results run: | - if [[ "${{ needs.e2e-shard-1.result }}" == "success" && \ - "${{ needs.e2e-shard-2.result }}" == "success" && \ - "${{ needs.e2e-shard-3.result }}" == "success" && \ - "${{ needs.e2e-shard-4.result }}" == "success" && \ - "${{ needs.e2e-shard-5.result }}" == "success" && \ - "${{ needs.merge-reports.result }}" == "success" ]]; then + if [[ "${{ needs.e2e-shards.result }}" == "success" && "${{ needs.merge-reports.result }}" == "success" ]]; then echo "All e2e tests passed" exit 0 else diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 8fe7b80ab6..4bfa8d3e63 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -6,16 +6,6 @@ on: cmd: required: true type: string - upload_artifacts: - required: false - type: boolean - default: false - artifact_name: - required: false - type: string - artifact_path: - required: false - type: string jobs: run: @@ -65,11 +55,3 @@ jobs: NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }} Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }} ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} - - - name: Upload artifacts - if: ${{ inputs.upload_artifacts == true }} - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.artifact_name }} - path: ${{ inputs.artifact_path }} - retention-days: 1 From 7404d2b8467f2f015bafe243cb23f6a4475865c0 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 16:11:36 +0000 Subject: [PATCH 04/15] fix(ci): update artifact actions to v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed upload-artifact from v5 to v4 (latest available version) - Changed download-artifact from v5 to v4 for consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cfe8a3af2c..cb8564ae1d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -67,7 +67,7 @@ jobs: ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} - name: Upload shard results - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v4 with: name: e2e-results-${{ matrix.shard }} path: e2e-results-${{ matrix.shard }}.blob @@ -101,7 +101,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Download all shard results - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v4 with: path: ./e2e-results pattern: e2e-results-* From 5e90d27bc1e3be0ae76065e498651f0d72cfdd3d Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 17:29:15 +0100 Subject: [PATCH 05/15] Refactor e2e.yml to use export for DATABASE_URL --- .github/workflows/e2e.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cb8564ae1d..39f2ecdb09 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -46,7 +46,8 @@ jobs: run: | set -eux pnpm run setup - cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob + export DATABASE_URL=postgres://postgres:pw@localhost:5432/test + E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} @@ -111,7 +112,7 @@ jobs: # Move all .blob files to root directory find ./e2e-results -name "*.blob" -exec mv {} ./ \; # Merge reports - cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --merge-reports + vitest run -c vitest/vitest.e2e.config.mts --merge-reports e2e: runs-on: ubuntu-latest From 13a23c28239f3ece6671180cf74a283e9f19f6eb Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 17:34:26 +0100 Subject: [PATCH 06/15] Update vitest command to use pnpm in e2e workflow --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 39f2ecdb09..3b617e55c2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -47,7 +47,7 @@ jobs: set -eux pnpm run setup export DATABASE_URL=postgres://postgres:pw@localhost:5432/test - E2E_TEST=true vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob + E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} @@ -112,7 +112,7 @@ jobs: # Move all .blob files to root directory find ./e2e-results -name "*.blob" -exec mv {} ./ \; # Merge reports - vitest run -c vitest/vitest.e2e.config.mts --merge-reports + pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports e2e: runs-on: ubuntu-latest From 5fed36e07b8e8aea9784a19f8aeb05870b677a90 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 16:38:36 +0000 Subject: [PATCH 07/15] fix(ci): handle test failures in e2e shards gracefully MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add || true to shard commands to prevent exit code 1 from failing the job - This allows blob files to be uploaded even when tests fail - The merge-reports step will handle the actual test result reporting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3b617e55c2..9e96c370b2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -47,7 +47,7 @@ jobs: set -eux pnpm run setup export DATABASE_URL=postgres://postgres:pw@localhost:5432/test - E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob + E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --no-file-parallelism --shard=${{ matrix.shard }}/5 --reporter=blob --outputFile=e2e-results-${{ matrix.shard }}.blob || true env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} From d95467288cca42b8e6b46084160a5e60937b3fa0 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 17:20:14 +0000 Subject: [PATCH 08/15] fix(ci): fix merge-reports directory structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create .vitest-reports directory for blob files (required by Vitest) - Move blob files to .vitest-reports instead of root directory - Add proper environment variables to merge-reports command 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9e96c370b2..3fd9851c2b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -109,10 +109,11 @@ jobs: - name: Merge reports run: | - # Move all .blob files to root directory - find ./e2e-results -name "*.blob" -exec mv {} ./ \; + # Create .vitest-reports directory and move blob files there + mkdir -p .vitest-reports + find ./e2e-results -name "*.blob" -exec mv {} .vitest-reports/ \; # Merge reports - pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports + cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports e2e: runs-on: ubuntu-latest From 367f72a52fd37d603d5d7e59b9d091faf82e8e4c Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 18:28:30 +0100 Subject: [PATCH 09/15] Remove cross-env-shell from E2E test command --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3fd9851c2b..4e792dce83 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -113,7 +113,7 @@ jobs: mkdir -p .vitest-reports find ./e2e-results -name "*.blob" -exec mv {} .vitest-reports/ \; # Merge reports - cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports + E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports e2e: runs-on: ubuntu-latest From a24ea0fdf88c2f80f63b48cbda766eb03a3efaf8 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 17:55:13 +0000 Subject: [PATCH 10/15] fix(ci): make upload-artifact step run unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add if: always() to ensure upload step runs even if tests fail - Add if-no-files-found: ignore to prevent job failure when artifact missing - This ensures shard jobs always complete successfully for proper workflow flow 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4e792dce83..0ec30c6213 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -68,11 +68,13 @@ jobs: ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }} - name: Upload shard results + if: always() uses: actions/upload-artifact@v4 with: name: e2e-results-${{ matrix.shard }} path: e2e-results-${{ matrix.shard }}.blob retention-days: 1 + if-no-files-found: ignore merge-reports: runs-on: ubuntu-latest From b828f9e63966bc6ae98c3a79fc75f79691f35ad9 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 19:33:41 +0100 Subject: [PATCH 11/15] Disable fail-fast in e2e-shards workflow --- .github/workflows/e2e.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0ec30c6213..ddf56b10b0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} strategy: + fail-fast: false matrix: shard: [1, 2, 3, 4, 5] steps: From 9b288b7a2f15b3c44db9aecd28b429acd50ce555 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 20:29:35 +0100 Subject: [PATCH 12/15] Update model name in API endpoint test --- apps/gateway/src/api-individual.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gateway/src/api-individual.e2e.ts b/apps/gateway/src/api-individual.e2e.ts index de07277331..3f75a8e08b 100644 --- a/apps/gateway/src/api-individual.e2e.ts +++ b/apps/gateway/src/api-individual.e2e.ts @@ -117,7 +117,7 @@ describe("e2e individual tests", () => { Authorization: `Bearer ${token}`, }, body: JSON.stringify({ - model: "anthropic/claude-3-5-sonnet-20241022", + model: "anthropic/claude-3-5-sonnet-20241022--undefined-wip-test", messages: [ { role: "user", From 8ca0827c50f042517d61fff6a25f690d008d9b58 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 20:41:18 +0100 Subject: [PATCH 13/15] Update model name in API request --- apps/gateway/src/api-individual.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gateway/src/api-individual.e2e.ts b/apps/gateway/src/api-individual.e2e.ts index 3f75a8e08b..de07277331 100644 --- a/apps/gateway/src/api-individual.e2e.ts +++ b/apps/gateway/src/api-individual.e2e.ts @@ -117,7 +117,7 @@ describe("e2e individual tests", () => { Authorization: `Bearer ${token}`, }, body: JSON.stringify({ - model: "anthropic/claude-3-5-sonnet-20241022--undefined-wip-test", + model: "anthropic/claude-3-5-sonnet-20241022", messages: [ { role: "user", From 939af15900063750e589a49456a867f563546584 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 19:44:21 +0000 Subject: [PATCH 14/15] refactor(ci): consolidate merge-reports and final e2e jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Combine merge-reports and e2e jobs into single e2e job - The merge-reports step will fail if tests fail, eliminating need for separate status check - Simplifies workflow while maintaining same functionality - Final job is named 'e2e' for branch protection compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ddf56b10b0..f890f2d25a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -77,7 +77,7 @@ jobs: retention-days: 1 if-no-files-found: ignore - merge-reports: + e2e: runs-on: ubuntu-latest needs: e2e-shards if: always() @@ -110,25 +110,10 @@ jobs: path: ./e2e-results pattern: e2e-results-* - - name: Merge reports + - name: Merge reports and show final results run: | # Create .vitest-reports directory and move blob files there mkdir -p .vitest-reports find ./e2e-results -name "*.blob" -exec mv {} .vitest-reports/ \; - # Merge reports - E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports - - e2e: - runs-on: ubuntu-latest - needs: [e2e-shards, merge-reports] - if: always() - steps: - - name: Check shard results - run: | - if [[ "${{ needs.e2e-shards.result }}" == "success" && "${{ needs.merge-reports.result }}" == "success" ]]; then - echo "All e2e tests passed" - exit 0 - else - echo "E2E tests failed" - exit 1 - fi + # Merge reports - this will fail if tests failed, providing the final status + cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports From e79abfaabe8ef78f58b5abe3181885f5fb1fb148 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Mon, 15 Sep 2025 19:53:58 +0000 Subject: [PATCH 15/15] refactor(ci): simplify merge-reports command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unnecessary cross-env-shell and DATABASE_URL from merge step - Merge reports only processes existing blob files, no DB connection needed - Cleaner and more efficient command 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f890f2d25a..976cfebe5e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -116,4 +116,4 @@ jobs: mkdir -p .vitest-reports find ./e2e-results -name "*.blob" -exec mv {} .vitest-reports/ \; # Merge reports - this will fail if tests failed, providing the final status - cross-env-shell "DATABASE_URL=${DATABASE_URL:-postgres://postgres:pw@localhost:5432/test}" E2E_TEST=true pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports + pnpm vitest run -c vitest/vitest.e2e.config.mts --merge-reports