From 27b5014b0566a749b3378e5d90fe9e6b9e85bd3a Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 1 Jul 2024 18:02:38 +0100 Subject: [PATCH] add cron --- .github/actions/download-artifact/action.yml | 44 -- .../enable-microphone-access/action.yml | 25 - .github/actions/run-test/action.yml | 93 --- .github/actions/upload-blob-report/action.yml | 34 -- .../cherry_pick_into_release_branch.yml | 81 --- .github/workflows/create_test_report.yml | 140 ----- .github/workflows/infra.yml | 55 -- .github/workflows/merge.config.ts | 4 - .../pr_check_client_side_changes.yml | 60 -- .github/workflows/publish_canary.yml | 84 --- .github/workflows/publish_release_docker.yml | 50 -- .github/workflows/publish_release_driver.yml | 37 -- .github/workflows/publish_release_npm.yml | 34 -- .../workflows/publish_release_traceviewer.yml | 20 - .../roll_browser_into_playwright.yml | 57 -- .github/workflows/roll_driver_nodejs.yml | 48 -- .github/workflows/tests_components.yml | 42 -- .github/workflows/tests_others.yml | 161 ----- .github/workflows/tests_primary.yml | 205 +------ .github/workflows/tests_secondary.yml | 558 ------------------ .github/workflows/tests_service.yml | 70 --- .github/workflows/tests_video.yml | 38 -- .github/workflows/trigger_tests.yml | 21 - 23 files changed, 19 insertions(+), 1942 deletions(-) delete mode 100644 .github/actions/download-artifact/action.yml delete mode 100644 .github/actions/enable-microphone-access/action.yml delete mode 100644 .github/actions/run-test/action.yml delete mode 100644 .github/actions/upload-blob-report/action.yml delete mode 100644 .github/workflows/cherry_pick_into_release_branch.yml delete mode 100644 .github/workflows/create_test_report.yml delete mode 100644 .github/workflows/infra.yml delete mode 100644 .github/workflows/merge.config.ts delete mode 100644 .github/workflows/pr_check_client_side_changes.yml delete mode 100644 .github/workflows/publish_canary.yml delete mode 100644 .github/workflows/publish_release_docker.yml delete mode 100644 .github/workflows/publish_release_driver.yml delete mode 100644 .github/workflows/publish_release_npm.yml delete mode 100644 .github/workflows/publish_release_traceviewer.yml delete mode 100644 .github/workflows/roll_browser_into_playwright.yml delete mode 100644 .github/workflows/roll_driver_nodejs.yml delete mode 100644 .github/workflows/tests_components.yml delete mode 100644 .github/workflows/tests_others.yml delete mode 100644 .github/workflows/tests_secondary.yml delete mode 100644 .github/workflows/tests_service.yml delete mode 100644 .github/workflows/tests_video.yml delete mode 100644 .github/workflows/trigger_tests.yml diff --git a/.github/actions/download-artifact/action.yml b/.github/actions/download-artifact/action.yml deleted file mode 100644 index d5dd4bea8975f..0000000000000 --- a/.github/actions/download-artifact/action.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: 'Download artifacts' -description: 'Download artifacts from GitHub' -inputs: - namePrefix: - description: 'Name prefix of the artifacts to download' - required: true - default: 'blob-report' - path: - description: 'Directory with downloaded artifacts' - required: true - default: '.' -runs: - using: "composite" - steps: - - name: Create temp downloads dir - shell: bash - run: mkdir -p '${{ inputs.path }}/artifacts' - - name: Download artifacts - uses: actions/github-script@v7 - with: - script: | - console.log(`downloading artifacts for workflow_run: ${context.payload.workflow_run.id}`); - console.log(`workflow_run: ${JSON.stringify(context.payload.workflow_run, null, 2)}`); - const allArtifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { - ...context.repo, - run_id: context.payload.workflow_run.id - }); - console.log('total = ', allArtifacts.length); - const artifacts = allArtifacts.filter(a => a.name.startsWith('${{ inputs.namePrefix }}')); - const fs = require('fs'); - for (const artifact of artifacts) { - const result = await github.rest.actions.downloadArtifact({ - ...context.repo, - artifact_id: artifact.id, - archive_format: 'zip' - }); - console.log(`Downloaded ${artifact.name}.zip (${result.data.byteLength} bytes)`); - fs.writeFileSync(`${{ inputs.path }}/artifacts/${artifact.name}.zip`, Buffer.from(result.data)); - } - - name: Unzip artifacts - shell: bash - run: | - unzip -n '${{ inputs.path }}/artifacts/*.zip' -d ${{ inputs.path }} - rm -rf '${{ inputs.path }}/artifacts' diff --git a/.github/actions/enable-microphone-access/action.yml b/.github/actions/enable-microphone-access/action.yml deleted file mode 100644 index b94f48064711f..0000000000000 --- a/.github/actions/enable-microphone-access/action.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Enable Microphone Access (macOS) -description: 'Allow microphone access to all apps on macOS' - -runs: - using: composite - steps: - # https://github.com/actions/runner-images/issues/9330 - - name: Allow microphone access to all apps - shell: bash - run: | - if [[ "$(uname)" != "Darwin" ]]; then - echo "Not macOS, exiting" - exit 0 - fi - echo "Allowing microphone access to all apps" - version=$(sw_vers -productVersion | cut -d. -f1) - if [[ "$version" == "14" ]]; then - sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);" - elif [[ "$version" == "12" || "$version" == "13" ]]; then - sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR REPLACE INTO access VALUES('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159);" - else - echo "macOS version is unsupported. Version is $version, exiting" - exit 1 - fi - echo "Successfully allowed microphone access" diff --git a/.github/actions/run-test/action.yml b/.github/actions/run-test/action.yml deleted file mode 100644 index c193515c4501d..0000000000000 --- a/.github/actions/run-test/action.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: 'Run browser tests' -description: 'Run browser tests' -inputs: - command: - description: 'Command to run tests' - required: true - node-version: - description: 'Node.js version to use' - required: false - default: '18' - browsers-to-install: - description: 'Browser to install. Default is all browsers.' - required: false - default: '' - bot-name: - description: 'Bot name' - required: true - shell: - description: 'Shell to use' - required: false - default: 'bash' - flakiness-client-id: - description: 'Azure Flakiness Dashboard Client ID' - required: false - flakiness-tenant-id: - description: 'Azure Flakiness Dashboard Tenant ID' - required: false - flakiness-subscription-id: - description: 'Azure Flakiness Dashboard Subscription ID' - required: false - -runs: - using: composite - steps: - - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - - uses: ./.github/actions/enable-microphone-access - - run: | - echo "::group::npm ci" - npm ci - echo "::endgroup::" - shell: bash - env: - DEBUG: pw:install - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' - - run: | - echo "::group::npm run build" - npm run build - echo "::endgroup::" - shell: bash - - run: | - echo "::group::npx playwright install --with-deps" - npx playwright install --with-deps ${{ inputs.browsers-to-install }} - echo "::endgroup::" - shell: bash - - name: Run tests - if: inputs.shell == 'bash' - run: | - if [[ "$(uname)" == "Linux" ]]; then - xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- ${{ inputs.command }} - else - ${{ inputs.command }} - fi - shell: bash - env: - PWTEST_BOT_NAME: ${{ inputs.bot-name }} - - name: Run tests - if: inputs.shell != 'bash' - run: ${{ inputs.command }} - shell: ${{ inputs.shell }} - env: - PWTEST_BOT_NAME: ${{ inputs.bot-name }} - - name: Azure Login - uses: azure/login@v2 - if: ${{ !cancelled() && github.event_name == 'push' && github.repository == 'microsoft/playwright' }} - with: - client-id: ${{ inputs.flakiness-client-id }} - tenant-id: ${{ inputs.flakiness-tenant-id }} - subscription-id: ${{ inputs.flakiness-subscription-id }} - - run: | - echo "::group::./utils/upload_flakiness_dashboard.sh" - ./utils/upload_flakiness_dashboard.sh ./test-results/report.json - echo "::endgroup::" - if: ${{ !cancelled() }} - shell: bash - - name: Upload blob report - # We only merge reports for PRs as per .github/workflows/create_test_report.yml. - if: ${{ !cancelled() && github.event_name == 'pull_request' }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: blob-report - job_name: ${{ inputs.bot-name }} diff --git a/.github/actions/upload-blob-report/action.yml b/.github/actions/upload-blob-report/action.yml deleted file mode 100644 index 72a084142a77f..0000000000000 --- a/.github/actions/upload-blob-report/action.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: 'Upload blob report' -description: 'Upload blob report to GitHub artifacts (for pull requests)' -inputs: - report_dir: - description: 'Directory containing blob report' - required: true - default: 'test-results/blob-report' - job_name: - description: 'Unique job name' - required: true - default: '' -runs: - using: "composite" - steps: - - name: Integrity check - shell: bash - run: find "${{ inputs.report_dir }}" -name "*.zip" -exec unzip -t {} \; - - name: Upload blob report to GitHub - if: ${{ !cancelled() && github.event_name == 'pull_request' }} - uses: actions/upload-artifact@v4 - with: - name: blob-report-${{ inputs.job_name }} - path: ${{ inputs.report_dir }}/** - retention-days: 7 - - name: Write triggering pull request number in a file - if: ${{ !cancelled() && github.event_name == 'pull_request' }} - shell: bash - run: echo '${{ github.event.number }}' > pull_request_number.txt; - - name: Upload artifact with the pull request number - if: ${{ !cancelled() && github.event_name == 'pull_request' }} - uses: actions/upload-artifact@v4 - with: - name: pull-request-${{ inputs.job_name }} - path: pull_request_number.txt \ No newline at end of file diff --git a/.github/workflows/cherry_pick_into_release_branch.yml b/.github/workflows/cherry_pick_into_release_branch.yml deleted file mode 100644 index 08c5562f35f03..0000000000000 --- a/.github/workflows/cherry_pick_into_release_branch.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Cherry-pick into release branch - -on: - workflow_dispatch: - inputs: - version: - type: string - description: Version number, e.g. 1.25 - required: true - commit_hashes: - type: string - description: Comma-separated list of commit hashes to cherry-pick - required: true - -permissions: - contents: write - -jobs: - roll: - runs-on: ubuntu-22.04 - steps: - - name: Validate input version number - run: | - VERSION="${{ github.event.inputs.version }}" - if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then - echo "Version is not a two digit semver version" - exit 1 - fi - - uses: actions/checkout@v4 - with: - ref: release-${{ github.event.inputs.version }} - fetch-depth: 0 - - name: Cherry-pick commits - id: cherry-pick - run: | - git config --global user.name github-actions - git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com - for COMMIT_HASH in $(echo "${{ github.event.inputs.commit_hashes }}" | tr "," "\n"); do - git cherry-pick --no-commit "$COMMIT_HASH" - - COMMIT_MESSAGE="$(git show -s --format=%B $COMMIT_HASH | head -n 1)" - COMMIT_MESSAGE=$(node -e ' - const match = /^(.*) (\(#\d+\))$/.exec(process.argv[1]); - if (!match) { - console.log(process.argv[1]); - process.exit(0); - } - console.log(`cherry-pick${match[2]}: ${match[1]}`); - ' "$COMMIT_MESSAGE") - - git commit -m "$COMMIT_MESSAGE" - done - LAST_COMMIT_MESSAGE=$(git show -s --format=%B) - echo "PR_TITLE=$LAST_COMMIT_MESSAGE" >> $GITHUB_OUTPUT - - name: Prepare branch - id: prepare-branch - run: | - BRANCH_NAME="cherry-pick-${{ github.event.inputs.version }}-$(date +%Y-%m-%d-%H-%M-%S)" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - git checkout -b "$BRANCH_NAME" - git push origin $BRANCH_NAME - - name: Create Pull Request - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} - script: | - const readableCommitHashesList = '${{ github.event.inputs.commit_hashes }}'.split(',').map(hash => `- ${hash}`).join('\n'); - const response = await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'release-${{ github.event.inputs.version }}', - title: '${{ steps.cherry-pick.outputs.PR_TITLE }}', - body: `This PR cherry-picks the following commits:\n\n${readableCommitHashesList}`, - }); - await github.rest.issues.addLabels({ - owner: 'microsoft', - repo: 'playwright', - issue_number: response.data.number, - labels: ['CQ1'], - }); diff --git a/.github/workflows/create_test_report.yml b/.github/workflows/create_test_report.yml deleted file mode 100644 index 9d382f1ee632e..0000000000000 --- a/.github/workflows/create_test_report.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: Publish Test Results -on: - workflow_run: - workflows: ["tests 1", "tests 2", "tests others"] - types: - - completed -jobs: - merge-reports: - permissions: - pull-requests: write - checks: write - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - if: ${{ github.event.workflow_run.event == 'pull_request' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - env: - DEBUG: pw:install - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - - run: npm run build - - - name: Download blob report artifact - uses: ./.github/actions/download-artifact - with: - namePrefix: 'blob-report' - path: 'all-blob-reports' - - - name: Merge reports - run: | - npx playwright merge-reports --config .github/workflows/merge.config.ts ./all-blob-reports - env: - NODE_OPTIONS: --max-old-space-size=4096 - - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_BLOB_REPORTS_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_BLOB_REPORTS_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_BLOB_REPORTS_SUBSCRIPTION_ID }} - - - name: Upload HTML report to Azure - run: | - REPORT_DIR='run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}' - azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR" - echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html" - env: - AZCOPY_AUTO_LOGIN_TYPE: AZCLI - - - name: Read pull request number - uses: ./.github/actions/download-artifact - with: - namePrefix: 'pull-request' - path: '.' - - - name: Comment on PR - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const fs = require('fs'); - let prNumber; - if (context.payload.workflow_run.event === 'pull_request') { - const prs = context.payload.workflow_run.pull_requests; - if (prs.length) { - prNumber = prs[0].number; - } else { - prNumber = parseInt(fs.readFileSync('pull_request_number.txt').toString()); - console.log('Read pull request number from file: ' + prNumber); - } - } else { - core.error('Unsupported workflow trigger event: ' + context.payload.workflow_run.event); - return; - } - if (!prNumber) { - core.error('No pull request found for commit ' + context.sha + ' and workflow triggered by: ' + context.payload.workflow_run.event); - return; - } - { - // Mark previous comments as outdated by minimizing them. - const { data: comments } = await github.rest.issues.listComments({ - ...context.repo, - issue_number: prNumber, - }); - for (const comment of comments) { - if (comment.user.login === 'github-actions[bot]' && /\[Test results\]\(https:\/\/.+?\) for "${{ github.event.workflow_run.name }}"/.test(comment.body)) { - await github.graphql(` - mutation { - minimizeComment(input: {subjectId: "${comment.node_id}", classifier: OUTDATED}) { - clientMutationId - } - } - `); - } - } - } - const reportDir = 'run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}'; - const reportUrl = `https://mspwblobreport.z1.web.core.windows.net/${reportDir}/index.html#?q=s%3Afailed%20s%3Aflaky`; - core.notice('Report url: ' + reportUrl); - const mergeWorkflowUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; - const reportMd = await fs.promises.readFile('report.md', 'utf8'); - function formatComment(lines) { - let body = lines.join('\n'); - if (body.length > 65535) - body = body.substring(0, 65000) + `... ${body.length - 65000} more characters`; - return body; - } - const { data: response } = await github.rest.issues.createComment({ - ...context.repo, - issue_number: prNumber, - body: formatComment([ - `### [Test results](${reportUrl}) for "${{ github.event.workflow_run.name }}"`, - reportMd, - '', - `Merge [workflow run](${mergeWorkflowUrl}).` - ]), - }); - core.info('Posted comment: ' + response.html_url); - - const check = await github.rest.checks.create({ - ...context.repo, - name: 'Merge report (${{ github.event.workflow_run.name }})', - head_sha: '${{ github.event.workflow_run.head_sha }}', - status: 'completed', - conclusion: 'success', - details_url: reportUrl, - output: { - title: 'Test results for "${{ github.event.workflow_run.name }}"', - summary: [ - reportMd, - '', - '---', - `Full [HTML report](${reportUrl}). Merge [workflow run](${mergeWorkflowUrl}).` - ].join('\n'), - } - }); diff --git a/.github/workflows/infra.yml b/.github/workflows/infra.yml deleted file mode 100644 index 3580ecc97ad8d..0000000000000 --- a/.github/workflows/infra.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: "infra" - -on: - push: - branches: - - main - - release-* - pull_request: - branches: - - main - - release-* - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - doc-and-lint: - name: "docs & lint" - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - run: npx playwright install-deps - - run: npx playwright install - - run: npm run lint - - name: Verify clean tree - run: | - if [[ -n $(git status -s) ]]; then - echo "ERROR: tree is dirty after npm run build:" - git diff - exit 1 - fi - - name: Audit prod NPM dependencies - run: npm audit --omit dev - lint-snippets: - name: "Lint snippets" - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 8.0.x - - run: npm ci - - run: pip install -r utils/doclint/linting-code-snippets/python/requirements.txt - - run: node utils/doclint/linting-code-snippets/cli.js diff --git a/.github/workflows/merge.config.ts b/.github/workflows/merge.config.ts deleted file mode 100644 index b39944bc809c1..0000000000000 --- a/.github/workflows/merge.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - testDir: '../../tests', - reporter: [['markdown'], ['html']] -}; \ No newline at end of file diff --git a/.github/workflows/pr_check_client_side_changes.yml b/.github/workflows/pr_check_client_side_changes.yml deleted file mode 100644 index 7748b5d514af3..0000000000000 --- a/.github/workflows/pr_check_client_side_changes.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: "Check client side changes" -on: - push: - branches: - - main - paths: - - 'docs/src/api/**/*' - - 'packages/playwright-core/src/client/**/*' - - 'packages/playwright-core/src/utils/isomorphic/**/*' - - 'packages/playwright/src/matchers/matchers.ts' - - 'packages/protocol/src/protocol.yml' -jobs: - check: - name: Check - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright' - steps: - - uses: actions/checkout@v4 - - name: Create GitHub issue - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} - script: | - const currentPlaywrightVersion = require('./package.json').version.match(/\d+\.\d+/)[0]; - const { data } = await github.rest.git.getCommit({ - owner: context.repo.owner, - repo: context.repo.repo, - commit_sha: context.sha, - }); - const commitHeader = data.message.split('\n')[0]; - - const title = '[Ports]: Backport client side changes for ' + currentPlaywrightVersion; - for (const repo of ['playwright-python', 'playwright-java', 'playwright-dotnet']) { - const { data: issuesData } = await github.rest.search.issuesAndPullRequests({ - q: `is:issue is:open repo:microsoft/${repo} in:title "${title}" author:playwrightmachine` - }) - let issueNumber = null; - let issueBody = ''; - if (issuesData.total_count > 0) { - issueNumber = issuesData.items[0].number - issueBody = issuesData.items[0].body - } else { - const { data: issueCreateData } = await github.rest.issues.create({ - owner: context.repo.owner, - repo: repo, - title, - body: 'Please backport client side changes: \n', - }); - issueNumber = issueCreateData.number; - issueBody = issueCreateData.body; - } - const newBody = issueBody.trimEnd() + ` - - [ ] https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha} (${commitHeader})`; - const data = await github.rest.issues.update({ - owner: context.repo.owner, - repo: repo, - issue_number: issueNumber, - body: newBody - }) - } diff --git a/.github/workflows/publish_canary.yml b/.github/workflows/publish_canary.yml deleted file mode 100644 index 50a156475529a..0000000000000 --- a/.github/workflows/publish_canary.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: "publish canary" - -on: - workflow_dispatch: - schedule: - - cron: "10 0 * * *" - push: - branches: - - release-* - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-canary: - name: "publish canary NPM" - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright' - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login) - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: npx playwright install-deps - - name: "@next: publish with commit timestamp (triggered manually)" - if: contains(github.ref, 'main') && github.event_name == 'workflow_dispatch' - run: | - node utils/build/update_canary_version.js --alpha --commit-timestamp - utils/publish_all_packages.sh --alpha - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: "@next: publish with today's date (triggered automatically)" - if: contains(github.ref, 'main') && github.event_name != 'workflow_dispatch' - run: | - node utils/build/update_canary_version.js --alpha --today-date - utils/publish_all_packages.sh --alpha - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: "@beta: publish with commit timestamp (triggered automatically)" - if: contains(github.ref, 'release') && github.event_name != 'workflow_dispatch' - run: | - node utils/build/update_canary_version.js --beta --commit-timestamp - utils/publish_all_packages.sh --beta - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_PW_CDN_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_PW_CDN_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }} - - name: build & publish driver - env: - AZ_UPLOAD_FOLDER: driver/next - run: | - utils/build/build-playwright-driver.sh - utils/build/upload-playwright-driver.sh - - publish-trace-viewer: - name: "publish Trace Viewer to trace.playwright.dev" - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Deploy Canary - run: bash utils/build/deploy-trace-viewer.sh --canary - if: contains(github.ref, 'main') - env: - GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} - - name: Deploy BETA - run: bash utils/build/deploy-trace-viewer.sh --beta - if: contains(github.ref, 'release') - env: - GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/publish_release_docker.yml b/.github/workflows/publish_release_docker.yml deleted file mode 100644 index 6a9e6d85ae05e..0000000000000 --- a/.github/workflows/publish_release_docker.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: "publish release - Docker" - -on: - workflow_dispatch: - inputs: - is_release: - required: true - type: boolean - description: "Is this a release image?" - - release: - types: [published] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-docker-release: - name: "publish to DockerHub" - runs-on: ubuntu-22.04 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - if: github.repository == 'microsoft/playwright' - environment: allow-publishing-docker-to-acr - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - name: Set up Docker QEMU for arm64 docker builds - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - run: npm ci - - run: npm run build - - run: npx playwright install-deps - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_DOCKER_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_DOCKER_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_DOCKER_SUBSCRIPTION_ID }} - - name: Login to ACR via OIDC - run: az acr login --name playwright - - run: ./utils/docker/publish_docker.sh stable - if: (github.event_name != 'workflow_dispatch' && !github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release == 'true') - - run: ./utils/docker/publish_docker.sh canary - if: (github.event_name != 'workflow_dispatch' && github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release != 'true') diff --git a/.github/workflows/publish_release_driver.yml b/.github/workflows/publish_release_driver.yml deleted file mode 100644 index 8ad1a4184a185..0000000000000 --- a/.github/workflows/publish_release_driver.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: "publish release - driver" - -on: - release: - types: [published] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-driver-release: - name: "publish playwright driver to CDN" - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright' - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login) - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: npx playwright install-deps - - run: utils/build/build-playwright-driver.sh - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_PW_CDN_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_PW_CDN_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }} - - run: utils/build/upload-playwright-driver.sh - env: - AZ_UPLOAD_FOLDER: driver diff --git a/.github/workflows/publish_release_npm.yml b/.github/workflows/publish_release_npm.yml deleted file mode 100644 index 46b58168345dc..0000000000000 --- a/.github/workflows/publish_release_npm.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "publish release - NPM" - -on: - release: - types: [published] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-npm-release: - name: "publish to NPM" - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright' - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: npx playwright install-deps - - run: utils/publish_all_packages.sh --release-candidate - if: ${{ github.event.release.prerelease }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: utils/publish_all_packages.sh --release - if: ${{ !github.event.release.prerelease }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish_release_traceviewer.yml b/.github/workflows/publish_release_traceviewer.yml deleted file mode 100644 index 60af5442e95b2..0000000000000 --- a/.github/workflows/publish_release_traceviewer.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: "publish release - TraceViewer" - -on: - release: - types: [published] - -jobs: - publish-trace-viewer: - name: "publish Trace Viewer to trace.playwright.dev" - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Deploy Stable - run: bash utils/build/deploy-trace-viewer.sh --stable - env: - GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/roll_browser_into_playwright.yml b/.github/workflows/roll_browser_into_playwright.yml deleted file mode 100644 index da905131603e6..0000000000000 --- a/.github/workflows/roll_browser_into_playwright.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Roll Browser into Playwright - -on: - repository_dispatch: - types: [roll_into_pw] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -permissions: - contents: write - -jobs: - roll: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - name: Install dependencies - run: npx playwright install-deps - - name: Roll to new revision - run: | - ./utils/roll_browser.js ${{ github.event.client_payload.browser }} ${{ github.event.client_payload.revision }} - npm run build - - name: Prepare branch - id: prepare-branch - run: | - BRANCH_NAME="roll-into-pw-${{ github.event.client_payload.browser }}/${{ github.event.client_payload.revision }}" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - git config --global user.name github-actions - git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com - git checkout -b "$BRANCH_NAME" - git add . - git commit -m "feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}" - git push origin $BRANCH_NAME - - name: Create Pull Request - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} - script: | - const response = await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'main', - title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}', - }); - await github.rest.issues.addLabels({ - owner: 'microsoft', - repo: 'playwright', - issue_number: response.data.number, - labels: ['CQ1'], - }); diff --git a/.github/workflows/roll_driver_nodejs.yml b/.github/workflows/roll_driver_nodejs.yml deleted file mode 100644 index ee0d3d262ce36..0000000000000 --- a/.github/workflows/roll_driver_nodejs.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: "PR: bump driver Node.js" -on: - workflow_dispatch: - schedule: - # At 10:00am UTC (3AM PST) every tuesday and thursday to roll to new Node.js driver - - cron: "0 10 * * 2,4" -jobs: - trigger-nodejs-roll: - name: Trigger Roll - runs-on: ubuntu-22.04 - if: github.repository == 'microsoft/playwright' - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: node utils/build/update-playwright-driver-version.mjs - - name: Prepare branch - id: prepare-branch - run: | - if [[ "$(git status --porcelain)" == "" ]]; then - echo "there are no changes"; - exit 0; - fi - echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT - BRANCH_NAME="roll-driver-nodejs/$(date +%Y-%b-%d)" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - git config --global user.name github-actions - git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com - git checkout -b "$BRANCH_NAME" - git add . - git commit -m "chore(driver): roll driver to recent Node.js LTS version" - git push origin $BRANCH_NAME - - name: Create Pull Request - if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }} - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} - script: | - await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'main', - title: 'chore(driver): roll driver to recent Node.js LTS version', - }); diff --git a/.github/workflows/tests_components.yml b/.github/workflows/tests_components.yml deleted file mode 100644 index 093d5de0c406d..0000000000000 --- a/.github/workflows/tests_components.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "components" - -on: - push: - branches: - - main - - release-* - pull_request: - paths-ignore: - - 'browser_patches/**' - - 'docs/**' - branches: - - main - - release-* - -env: - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - test_components: - name: ${{ matrix.os }} - Node.js ${{ matrix.node-version }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - node-version: [18] - include: - - os: ubuntu-latest - node-version: 20 - - os: ubuntu-latest - node-version: 22 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps - - run: npm run ct diff --git a/.github/workflows/tests_others.yml b/.github/workflows/tests_others.yml deleted file mode 100644 index 783f3fe2ff800..0000000000000 --- a/.github/workflows/tests_others.yml +++ /dev/null @@ -1,161 +0,0 @@ -name: tests others - -on: - push: - branches: - - main - - release-* - pull_request: - paths-ignore: - - 'browser_patches/**' - - 'docs/**' - types: [ labeled ] - branches: - - main - - release-* - -env: - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - test_stress: - name: Stress - ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Stick with macos-latest-large for now which is Intel-based until - # https://github.com/microsoft/playwright/issues/30705 is fixed. - os: [ubuntu-latest, macos-latest-large, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps - - run: npm run stest contexts -- --project=chromium - if: ${{ !cancelled() }} - - run: npm run stest browsers -- --project=chromium - if: ${{ !cancelled() }} - - run: npm run stest frames -- --project=chromium - if: ${{ !cancelled() }} - - run: npm run stest contexts -- --project=webkit - if: ${{ !cancelled() }} - - run: npm run stest browsers -- --project=webkit - if: ${{ !cancelled() }} - - run: npm run stest frames -- --project=webkit - if: ${{ !cancelled() }} - - run: npm run stest contexts -- --project=firefox - if: ${{ !cancelled() }} - - run: npm run stest browsers -- --project=firefox - if: ${{ !cancelled() }} - - run: npm run stest frames -- --project=firefox - if: ${{ !cancelled() }} - - run: npm run stest heap -- --project=chromium - if: ${{ !cancelled() }} - - test_webview2: - name: WebView2 - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-2022 - 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@v4 - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '8.0.x' - - run: dotnet build - working-directory: tests/webview2/webview2-app/ - - name: Update to Evergreen WebView2 Runtime - shell: pwsh - run: | - # See here: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ - Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' -OutFile 'setup.exe' - Start-Process -FilePath setup.exe -Verb RunAs -Wait - - uses: ./.github/actions/run-test - with: - node-version: 20 - browsers-to-install: chromium - command: npm run webview2test - bot-name: "webview2-chromium-windows" - 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 }} - - test_clock_frozen_time_linux: - name: time library - ${{ matrix.clock }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - strategy: - fail-fast: false - matrix: - clock: [frozen, realtime] - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: 20 - browsers-to-install: chromium - command: npm run test -- --project=chromium-* - bot-name: "${{ matrix.clock }}-time-library-chromium-linux" - 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: - PW_CLOCK: ${{ matrix.clock }} - - test_clock_frozen_time_test_runner: - name: time test runner - ${{ matrix.clock }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-22.04 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - strategy: - fail-fast: false - matrix: - clock: [frozen, realtime] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: 20 - command: npm run ttest - bot-name: "${{ matrix.clock }}-time-runner-chromium-linux" - 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: - PW_CLOCK: ${{ matrix.clock }} - - test_electron: - name: Electron - ${{ matrix.os }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium - command: npm run etest - bot-name: "electron-${{ matrix.os }}" - 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: - ELECTRON_SKIP_BINARY_DOWNLOAD: diff --git a/.github/workflows/tests_primary.yml b/.github/workflows/tests_primary.yml index 0316908da9f99..61ef205a5def9 100644 --- a/.github/workflows/tests_primary.yml +++ b/.github/workflows/tests_primary.yml @@ -1,6 +1,8 @@ name: "tests 1" on: + schedule: + - cron: "0/10 * * * *" push: branches: - main @@ -23,204 +25,35 @@ env: # Force terminal colors. @see https://www.npmjs.com/package/colors FORCE_COLOR: 1 ELECTRON_SKIP_BINARY_DOWNLOAD: 1 + CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }} + CURRENTS_CI_BUILD_ID: "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}" jobs: test_linux: name: ${{ matrix.os }} (${{ matrix.browser }} - Node.js ${{ matrix.node-version }}) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} strategy: fail-fast: false matrix: browser: [chromium, firefox, webkit] os: [ubuntu-22.04] node-version: [18] - include: - - os: ubuntu-22.04 - node-version: 20 - browser: chromium - - os: ubuntu-22.04 - node-version: 22 - browser: chromium 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@v4 - - uses: ./.github/actions/run-test - with: - node-version: ${{ matrix.node-version }} - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}-node${{ matrix.node-version }}" - 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 }} - - test_linux_chromium_tot: - name: ${{ matrix.os }} (chromium tip-of-tree) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04] - 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@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium-tip-of-tree - command: npm run test -- --project=chromium-* - bot-name: "${{ matrix.os }}-chromium-tip-of-tree" - 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: chromium-tip-of-tree - - test_test_runner: - name: Test Runner - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [18] - shardIndex: [1, 2] - shardTotal: [2] - include: - - os: ubuntu-latest - node-version: 20 - shardIndex: 1 - shardTotal: 2 - - os: ubuntu-latest - node-version: 20 - shardIndex: 2 - shardTotal: 2 - - os: ubuntu-latest - node-version: 22 - shardIndex: 1 - shardTotal: 2 - - os: ubuntu-latest - node-version: 22 - shardIndex: 2 - shardTotal: 2 - 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@v4 - - 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 }}-${{ 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 - - test_web_components: - name: Web Components - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - env: - DEBUG: pw:install - - run: npm run build - - - run: npx playwright install --with-deps - - run: npm run test-html-reporter - env: - PWTEST_BOT_NAME: "web-components-html-reporter" - - name: Upload blob report - if: ${{ !cancelled() }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: packages/html-reporter/blob-report - job_name: "web-components-html-reporter" - - - run: npm run test-web - if: ${{ !cancelled() }} - env: - PWTEST_BOT_NAME: "web-components-web" - - name: Upload blob report - if: ${{ !cancelled() }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: packages/web/blob-report - job_name: "web-components-web" - - test_vscode_extension: - name: VSCode Extension - runs-on: ubuntu-latest - env: - PWTEST_BOT_NAME: "vscode-extension" steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 - - 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));" - working-directory: ./playwright-vscode - - name: Build extension - run: npm install && npm run build - working-directory: ./playwright-vscode - - name: Run extension tests - run: npm run test -- --workers=1 - working-directory: ./playwright-vscode - - name: Upload blob report - if: ${{ !cancelled() }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: playwright-vscode/blob-report - job_name: ${{ env.PWTEST_BOT_NAME }} - - test_package_installations: - name: "Installation Test ${{ matrix.os }}" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - 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@v4 - - run: npm install -g yarn@1 - - run: npm install -g pnpm@8 - - uses: ./.github/actions/run-test - with: - command: npm run itest - bot-name: "package-installations-${{ matrix.os }}" - # TODO: figure out why itest fails with 'bash' on Windows. - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - 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 }} + node-version: ${{ matrix.node-version }} + - run: | + echo "::group::npm run build" + npm run build + echo "::endgroup::" + shell: bash + - run: | + echo "::group::npx playwright install --with-deps" + npx playwright install --with-deps ${{ matrix.browser }} + echo "::endgroup::" + shell: bash + - name: Run tests + run: | + xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}-* + shell: bash diff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.yml deleted file mode 100644 index fd5458fb89f04..0000000000000 --- a/.github/workflows/tests_secondary.yml +++ /dev/null @@ -1,558 +0,0 @@ -name: "tests 2" - -on: - push: - branches: - - main - - release-* - pull_request: - paths-ignore: - - 'browser_patches/**' - - 'docs/**' - types: [ labeled ] - branches: - - main - - release-* - -env: - # Force terminal colors. @see https://www.npmjs.com/package/colors - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - -jobs: - test_linux: - name: ${{ matrix.os }} (${{ matrix.browser }}) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-20.04, ubuntu-24.04] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}" - 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 }} - - test_mac: - name: ${{ matrix.os }} (${{ matrix.browser }}) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [macos-12, macos-13, macos-14] - browser: [chromium, firefox, webkit] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}" - 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 }} - - test_win: - name: "Windows" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* ${{ matrix.browser == 'firefox' && '--workers 1' || '' }} - bot-name: "${{ matrix.browser }}-windows-latest" - 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 }} - - test-package-installations-other-node-versions: - name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - node_version: 20 - - os: ubuntu-latest - node_version: 22 - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - run: npm install -g yarn@1 - - run: npm install -g pnpm@8 - - uses: ./.github/actions/run-test - with: - node-version: ${{ matrix.node_version }} - command: npm run itest - bot-name: "package-installations-${{ matrix.os }}-node${{ matrix.node_version }}" - 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 }} - - headed_tests: - name: "headed ${{ matrix.browser }} (${{ matrix.os }})" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-14, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* --headed - bot-name: "${{ matrix.browser }}-headed-${{ matrix.os }}" - 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 }} - - transport_linux: - name: "Transport" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - mode: [driver, service] - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium - command: npm run ctest - bot-name: "${{ matrix.mode }}" - 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_MODE: ${{ matrix.mode }} - - tracing_linux: - name: Tracing ${{ matrix.browser }} ${{ matrix.channel }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - include: - - browser: chromium - - browser: firefox - - browser: webkit - - browser: chromium - channel: chromium-tip-of-tree - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium ${{ matrix.channel }} - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "tracing-${{ matrix.channel || matrix.browser }}" - 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_TRACE: 1 - PWTEST_CHANNEL: ${{ matrix.channel }} - - chrome_stable_linux: - name: "Chrome Stable (Linux)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chrome - command: npm run ctest - bot-name: "chrome-stable-linux" - 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: chrome - - chrome_stable_win: - name: "Chrome Stable (Win)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chrome - command: npm run ctest - bot-name: "chrome-stable-windows" - 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: chrome - - chrome_stable_mac: - name: "Chrome Stable (Mac)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chrome - command: npm run ctest - bot-name: "chrome-stable-mac" - 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: chrome - - chromium_tot: - name: Chromium tip-of-tree ${{ matrix.os }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, macos-12, windows-latest] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium-tip-of-tree - command: npm run ctest - bot-name: "tip-of-tree-${{ matrix.os }}" - 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: chromium-tip-of-tree - - chromium_tot_headed: - name: Chromium tip-of-tree headed ${{ matrix.os }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium-tip-of-tree - command: npm run ctest -- --headed - bot-name: "tip-of-tree-headed-${{ matrix.os }}" - 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: chromium-tip-of-tree - - firefox_beta_linux: - name: "Firefox Beta (Linux)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: firefox-beta chromium - command: npm run ftest - bot-name: "firefox-beta-linux" - 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 - - firefox_beta_win: - name: "Firefox Beta (Win)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: firefox-beta chromium - command: npm run ftest -- --workers=1 - bot-name: "firefox-beta-windows" - 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 - - firefox_beta_mac: - name: "Firefox Beta (Mac)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - # Stick with macos-latest-large for now which is Intel-based until - # https://github.com/microsoft/playwright/issues/30705 is fixed. - runs-on: macos-latest-large - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: firefox-beta chromium - command: npm run ftest - bot-name: "firefox-beta-mac" - 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 - - edge_stable_mac: - name: "Edge Stable (Mac)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge - command: npm run ctest - bot-name: "edge-stable-mac" - 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: msedge - - edge_stable_win: - name: "Edge Stable (Win)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge - command: npm run ctest - bot-name: "edge-stable-windows" - 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: msedge - - edge_stable_linux: - name: "Edge Stable (Linux)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge - command: npm run ctest - bot-name: "edge-stable-linux" - 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: msedge - - edge_beta_mac: - name: "Edge Beta (Mac)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge-beta - command: npm run ctest - bot-name: "edge-beta-mac" - 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: msedge-beta - - edge_beta_win: - name: "Edge Beta (Win)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge-beta - command: npm run ctest - bot-name: "edge-beta-windows" - 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: msedge-beta - - edge_beta_linux: - name: "Edge Beta (Linux)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge-beta - command: npm run ctest - bot-name: "edge-beta-linux" - 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: msedge-beta - - edge_dev_mac: - name: "Edge Dev (Mac)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge-dev - command: npm run ctest - bot-name: "edge-dev-mac" - 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: msedge-dev - - edge_dev_win: - name: "Edge Dev (Win)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge-dev - command: npm run ctest - bot-name: "edge-dev-windows" - 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: msedge-dev - - edge_dev_linux: - name: "Edge Dev (Linux)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: msedge-dev - command: npm run ctest - bot-name: "edge-dev-linux" - 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: msedge-dev - - chrome_beta_linux: - name: "Chrome Beta (Linux)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chrome-beta - command: npm run ctest - bot-name: "chrome-beta-linux" - 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: chrome-beta - - chrome_beta_win: - name: "Chrome Beta (Win)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chrome-beta - command: npm run ctest - bot-name: "chrome-beta-windows" - 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: chrome-beta - - chrome_beta_mac: - name: "Chrome Beta (Mac)" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chrome-beta - command: npm run ctest - bot-name: "chrome-beta-mac" - 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: chrome-beta - - build-playwright-driver: - name: "build-playwright-driver" - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - run: npx playwright install-deps - - run: utils/build/build-playwright-driver.sh - - test_linux_chromium_headless_new: - name: Linux Chromium Headless New - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium - command: npm run ctest - bot-name: "headless-new" - 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: - PLAYWRIGHT_CHROMIUM_USE_HEADLESS_NEW: 1 diff --git a/.github/workflows/tests_service.yml b/.github/workflows/tests_service.yml deleted file mode 100644 index 2739680712d66..0000000000000 --- a/.github/workflows/tests_service.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: "tests service" - -on: - workflow_dispatch: - -env: - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - test: - name: "Service" - strategy: - fail-fast: false - matrix: - service-os: [linux, windows] - browser: [chromium, firefox, webkit] - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - - run: npm ci - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - - run: npm run build - - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}-* --workers=10 --retries=0 - env: - PWTEST_MODE: service2 - PWTEST_TRACE: 1 - PWTEST_BOT_NAME: "${{ matrix.browser }}-${{ matrix.service-os }}-service" - PLAYWRIGHT_SERVICE_ACCESS_KEY: ${{ secrets.PLAYWRIGHT_SERVICE_ACCESS_KEY }} - PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }} - PLAYWRIGHT_SERVICE_OS: ${{ matrix.service-os }} - PLAYWRIGHT_SERVICE_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }} - - name: Upload blob report to GitHub - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v3 - with: - name: all-blob-reports - path: blob-report - retention-days: 2 - - merge_reports: - name: "Merge reports" - needs: [test] - if: ${{ !cancelled() }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - - run: npm ci - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - - run: npm run build - - name: Download blob report artifact - uses: actions/download-artifact@v3 - with: - name: all-blob-reports - path: all-blob-reports - - run: npx playwright merge-reports --reporter markdown,html ./all-blob-reports - - name: Upload HTML report to Azure - run: | - REPORT_DIR='run-service-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' - azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR" - echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html#?q=s:failed" - env: - AZCOPY_AUTO_LOGIN_TYPE: SPN - AZCOPY_SPA_APPLICATION_ID: '${{ secrets.AZCOPY_SPA_APPLICATION_ID }}' - AZCOPY_SPA_CLIENT_SECRET: '${{ secrets.AZCOPY_SPA_CLIENT_SECRET }}' - AZCOPY_TENANT_ID: '${{ secrets.AZCOPY_TENANT_ID }}' diff --git a/.github/workflows/tests_video.yml b/.github/workflows/tests_video.yml deleted file mode 100644 index 0733b082a0818..0000000000000 --- a/.github/workflows/tests_video.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "tests Video" - -on: - push: - branches: - - main - - release-* - -env: - # Force terminal colors. @see https://www.npmjs.com/package/colors - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - video_linux: - name: "Video Linux" - environment: allow-uploading-flakiness-results - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-20.04, ubuntu-22.04] - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}" - 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_VIDEO: 1 diff --git a/.github/workflows/trigger_tests.yml b/.github/workflows/trigger_tests.yml deleted file mode 100644 index dcd68dca37440..0000000000000 --- a/.github/workflows/trigger_tests.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Internal Tests" - -on: - push: - branches: - - main - - release-* - -jobs: - trigger: - name: "trigger" - runs-on: ubuntu-20.04 - steps: - - run: | - curl -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${GH_TOKEN}" \ - --data "{\"event_type\": \"playwright_tests\", \"client_payload\": {\"ref\": \"${GITHUB_SHA}\"}}" \ - https://api.github.com/repos/microsoft/playwright-browsers/dispatches - env: - GH_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}