Piyush/sdk overhaul #19
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'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build SDK and pack | |
| run: npm run pack | |
| - 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 | |
| - name: Install SDK | |
| working-directory: ./test-app | |
| run: npm install ../dist/imagekit-angular/imagekit-angular-*.tgz --no-save | |
| # Note: Playwright browsers are installed via postinstall script | |
| - name: Install browsers for Playwright | |
| working-directory: ./test-app | |
| run: npx playwright install --with-deps | |
| - name: Run Playwright tests | |
| working-directory: ./test-app | |
| run: npm run test:e2e | |
| - 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 | |