ci: shard API v2 E2E tests into 4 parallel jobs (#26183)

* ci: shard API v2 E2E tests into 4 parallel jobs

Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>

* check

* Fix typo in workflow name from 'Update' to 'Updatee'

* Rename workflow from 'PR Updatee' to 'PR Update'

* update

* test

* update

* fix

* update

* check

* remove

* revert

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Anik Dhabal Babu
2025-12-24 10:46:49 -03:00
committed by GitHub
co-authored by anik@cal.com <adhabal2002@gmail.com> Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 49d5f204f0
commit 8befcced39
4 changed files with 86 additions and 20 deletions
+6 -19
View File
@@ -30,7 +30,7 @@ env:
jobs:
e2e:
timeout-minutes: 20
name: E2E API v2
name: E2E API v2 (${{ matrix.shard }}/${{ strategy.job-total }})
runs-on: buildjet-16vcpu-ubuntu-2204
services:
postgres:
@@ -63,6 +63,8 @@ jobs:
--health-retries 5
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: docker/login-action@v3
with:
@@ -73,32 +75,17 @@ jobs:
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/cache-db
- name: Generate Swagger
working-directory: apps/api/v2
run: yarn generate-swagger
- name: Check breaking changes
run: |
docker run --rm \
-v "$PWD:/work" -w /work \
tufin/oasdiff:latest \
breaking \
https://raw.githubusercontent.com/calcom/cal.com/refs/heads/main/docs/api-reference/v2/openapi.json \
docs/api-reference/v2/openapi.json \
--fail-on ERR \
--err-ignore .github/oasdiff-err-ignore.txt
- name: Run Tests
working-directory: apps/api/v2
run: |
yarn workspace @calcom/platform-libraries build && yarn test:e2e
yarn test:e2e --shard=${{ matrix.shard }}/${{ strategy.job-total }}
EXIT_CODE=$?
echo "yarn workspace @calcom/platform-libraries build && yarn test:e2e command exit code: $EXIT_CODE"
echo "yarn test:e2e --shard=${{ matrix.shard }}/${{ strategy.job-total }} command exit code: $EXIT_CODE"
exit $EXIT_CODE
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test-results-api-v2
name: test-results-api-v2-shard-${{ matrix.shard }}
path: test-results