Piyush/sdk overhaul #4
Workflow file for this run
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
| # This is a test workflow for testing the tests | |
| name: E2E Tests | |
| on: | |
| push: | |
| branches: ['*'] | |
| pull_request: | |
| branches: ['*'] | |
| jobs: | |
| playwright-run: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| project: ['Desktop Chrome', 'Desktop Firefox', 'Desktop Safari'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build SDK | |
| run: npm run build | |
| - name: Verify SDK build | |
| run: | | |
| if [ ! -d "dist/imagekit-angular" ]; then | |
| echo "Error: SDK build directory not found" | |
| exit 1 | |
| fi | |
| echo "✓ SDK built successfully" | |
| - name: Install test app dependencies | |
| working-directory: ./test-app | |
| run: npm ci | |
| # Note: Playwright browsers are installed via postinstall script | |
| - name: Run Playwright tests | |
| working-directory: ./test-app | |
| run: npm run test:e2e -- --project="${{ matrix.project }}" | |
| - name: Upload test results on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-results-${{ matrix.project }} | |
| path: test-app/test-results/ | |
| if-no-files-found: ignore | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-${{ matrix.project }} | |
| path: test-app/playwright-report/ | |
| retention-days: 30 | |
| if-no-files-found: ignore | |
| - name: Generate test report | |
| if: always() | |
| run: | | |
| echo "## Test Results - ${{ matrix.project }}" >> $GITHUB_STEP_SUMMARY | |
| echo "Project: ${{ matrix.project }}" >> $GITHUB_STEP_SUMMARY | |