Skip to content

Commit cf363ae

Browse files
committed
✅ Run Swift SDK in E2E workflow
Adds the Swift package to the shared SDK E2E GitHub Actions workflow with both local TDD and cloud-mode coverage, using the Swift-specific project token secret.
1 parent 73e2d86 commit cf363ae

1 file changed

Lines changed: 45 additions & 1 deletion

File tree

.github/workflows/sdk-e2e.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,51 @@ jobs:
376376
VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }}
377377
VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }}
378378

379+
# Swift SDK
380+
swift:
381+
name: Swift SDK
382+
runs-on: macos-latest
383+
timeout-minutes: 10
384+
385+
steps:
386+
- uses: actions/checkout@v4
387+
388+
- name: Use Node.js 22
389+
uses: actions/setup-node@v4
390+
with:
391+
node-version: 22
392+
cache: 'npm'
393+
394+
- name: Install CLI dependencies
395+
run: npm ci
396+
397+
- name: Build CLI
398+
run: npm run build
399+
400+
- name: Build Swift package
401+
working-directory: ./clients/swift
402+
run: swift build
403+
404+
- name: Run E2E tests (TDD mode)
405+
working-directory: ./clients/swift
406+
run: ../../bin/vizzly.js tdd run "VIZZLY_E2E=1 swift test --filter VizzlyE2ETests"
407+
env:
408+
CI: true
409+
410+
- name: Run E2E tests (Cloud mode)
411+
working-directory: ./clients/swift
412+
run: ../../bin/vizzly.js run "VIZZLY_E2E=1 swift test --filter VizzlyE2ETests"
413+
env:
414+
CI: true
415+
VIZZLY_TOKEN: ${{ secrets.VIZZLY_SWIFT_CLIENT_TOKEN }}
416+
VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }}
417+
VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }}
418+
379419
# Status check for branch protection
380420
check:
381421
name: E2E Status
382422
runs-on: ubuntu-latest
383-
needs: [core-js, vitest, storybook, static-site, ember, ruby]
423+
needs: [core-js, vitest, storybook, static-site, ember, ruby, swift]
384424
if: always()
385425
steps:
386426
- name: Check all SDK E2E tests passed
@@ -409,4 +449,8 @@ jobs:
409449
echo "Ruby SDK E2E tests failed"
410450
exit 1
411451
fi
452+
if [[ "${{ needs.swift.result }}" == "failure" ]]; then
453+
echo "Swift SDK E2E tests failed"
454+
exit 1
455+
fi
412456
echo "All SDK E2E tests passed"

0 commit comments

Comments
 (0)