E2E Web Sanity Tests #1
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
| # Copyright (c) Microsoft Corporation. | |
| # Licensed under the MIT License. | |
| # | |
| # E2E Web Sanity Tests for VS Code Web extension | |
| # Runs against a real Power Platform test environment | |
| name: E2E Web Sanity Tests | |
| on: | |
| schedule: | |
| - cron: '0 2 * * 1' # Weekly on Monday at 2 AM UTC | |
| workflow_dispatch: | |
| inputs: | |
| headed: | |
| description: 'Run tests in headed mode (for debugging)' | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Build extension | |
| run: npm run dist | |
| - name: Run E2E sanity tests | |
| run: npm run test-e2e | |
| env: | |
| CI: true | |
| PP_TEST_VSCODE_URL: ${{ secrets.PP_TEST_VSCODE_URL }} | |
| PP_TEST_USERNAME: ${{ secrets.PP_TEST_USERNAME }} | |
| PP_TEST_PASSWORD: ${{ secrets.PP_TEST_PASSWORD }} | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 14 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: e2e-test-results | |
| path: test-results/ | |
| retention-days: 14 |