-
Notifications
You must be signed in to change notification settings - Fork 5.4k
devops: split test runner tests and core tests into seperate workflows #39760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dgozman
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
dgozman:devops-test-test-runner
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+134
−103
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| name: "test runner" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - release-* | ||
| pull_request: | ||
| paths-ignore: | ||
| - 'browser_patches/**' | ||
| - 'docs/**' | ||
| - 'packages/playwright-core/src/server/bidi/**' | ||
| - 'packages/playwright-core/src/tools/**' | ||
| - 'tests/bidi/**' | ||
| - 'tests/mcp/**' | ||
| branches: | ||
| - main | ||
| - release-* | ||
|
|
||
| concurrency: | ||
| # For pull requests, cancel all currently-running jobs for this workflow | ||
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| # Force terminal colors. @see https://www.npmjs.com/package/colors | ||
| FORCE_COLOR: 1 | ||
| ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | ||
|
|
||
| jobs: | ||
| test_test_runner: | ||
| name: Test Runner | ||
| environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| node-version: [20] | ||
| shardIndex: [1, 2] | ||
| shardTotal: [2] | ||
| shardWeights: ['58:42'] | ||
| include: | ||
| - os: windows-latest | ||
| node-version: 20 | ||
| shardIndex: 1 | ||
| shardTotal: 3 | ||
| shardWeights: '44:33:23' | ||
| - os: windows-latest | ||
| node-version: 20 | ||
| shardIndex: 2 | ||
| shardTotal: 3 | ||
| shardWeights: '44:33:23' | ||
| - os: windows-latest | ||
| node-version: 20 | ||
| shardIndex: 3 | ||
| shardTotal: 3 | ||
| shardWeights: '44:33:23' | ||
| - os: ubuntu-latest | ||
| node-version: 22 | ||
| shardIndex: 1 | ||
| shardTotal: 2 | ||
| shardWeights: '58:42' | ||
| - os: ubuntu-latest | ||
| node-version: 22 | ||
| shardIndex: 2 | ||
| shardTotal: 2 | ||
| shardWeights: '58:42' | ||
| - os: ubuntu-latest | ||
| node-version: 24 | ||
| shardIndex: 1 | ||
| shardTotal: 2 | ||
| shardWeights: '58:42' | ||
| - os: ubuntu-latest | ||
| node-version: 24 | ||
| shardIndex: 2 | ||
| shardTotal: 2 | ||
| shardWeights: '58:42' | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| id-token: write # This is required for OIDC login (azure/login) to succeed | ||
| contents: read # This is required for actions/checkout to succeed | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: ./.github/actions/run-test | ||
| with: | ||
| node-version: ${{matrix.node-version}} | ||
| command: npm run ttest -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | ||
| bot-name: "${{ matrix.os }}-node${{ matrix.node-version }}" | ||
| shard-index: ${{ matrix.shardIndex }} | ||
| flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} | ||
| flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} | ||
| flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} | ||
| env: | ||
| PWTEST_CHANNEL: firefox-beta | ||
| PWTEST_SHARD_WEIGHTS: ${{ matrix.shardWeights }} | ||
|
|
||
| test_vscode_extension: | ||
| name: VSCode Extension | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 20 | ||
| - run: npm ci | ||
| env: | ||
| DEBUG: pw:install | ||
| - run: npm run build | ||
| - run: npx playwright install chromium | ||
| - name: Checkout extension | ||
| run: git clone https://github.com/microsoft/playwright-vscode.git | ||
| - name: Print extension revision | ||
| run: git rev-parse HEAD | ||
| working-directory: ./playwright-vscode | ||
| - name: Remove @playwright/test from extension dependencies | ||
| run: node -e "const p = require('./package.json'); delete p.devDependencies['@playwright/test']; fs.writeFileSync('./package.json', JSON.stringify(p, null, 2));" | ||
yury-s marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| working-directory: ./playwright-vscode | ||
| - name: Build extension | ||
| run: npm ci && npm run build | ||
| working-directory: ./playwright-vscode | ||
| - name: Run extension tests | ||
| run: npm run test | ||
| working-directory: ./playwright-vscode | ||
| env: | ||
| PW_TAG: "@vscode-extension" | ||
| - name: Upload blob report | ||
| if: ${{ !cancelled() && (github.event_name == 'pull_request' || failure()) }} | ||
| uses: ./.github/actions/upload-blob-report | ||
| with: | ||
| report_dir: playwright-vscode/blob-report | ||
| job_name: vscode-extension | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
library tests depend on expect