|
| 1 | +--- |
| 2 | +on: |
| 3 | + schedule: every 1mo |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +description: > |
| 7 | + Monthly workflow that checks for newer Selenium and Playwright versions |
| 8 | + and opens a PR to update them in the repository. |
| 9 | +
|
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + pull-requests: read |
| 13 | + issues: read |
| 14 | + |
| 15 | +network: |
| 16 | + allowed: |
| 17 | + - defaults |
| 18 | + - dotnet |
| 19 | + - containers |
| 20 | + |
| 21 | +tools: |
| 22 | + github: |
| 23 | + edit: |
| 24 | + bash: ["grep", "sed", "jq", "git"] |
| 25 | + |
| 26 | +mcp-servers: |
| 27 | + nuget: |
| 28 | + container: "mcr.microsoft.com/dotnet/sdk:10.0" |
| 29 | + entrypoint: "dnx" |
| 30 | + entrypointArgs: ["NuGet.Mcp.Server", "--source", "https://api.nuget.org/v3/index.json", "--yes"] |
| 31 | + allowed: ["get-latest-package-version"] |
| 32 | + |
| 33 | +safe-outputs: |
| 34 | + create-pull-request: |
| 35 | + title-prefix: "[build-ops] " |
| 36 | + labels: [build-ops] |
| 37 | + draft: false |
| 38 | + base-branch: main |
| 39 | + add-comment: |
| 40 | + target: "*" |
| 41 | + max: 1 |
| 42 | +--- |
| 43 | + |
| 44 | +# Update Browser-Testing Dependencies (Selenium & Playwright) |
| 45 | + |
| 46 | +Selenium is used in the aspnetcore repo for automated E2E integration testing. |
| 47 | +Playwright is used for some benchmarking apps. Both need to be kept up to date. |
| 48 | + |
| 49 | +## Task |
| 50 | + |
| 51 | +Check for the latest stable versions of the following NuGet packages and update them in the repository if newer versions are available. |
| 52 | + |
| 53 | +### 1. Selenium packages |
| 54 | + |
| 55 | +Look up the latest stable versions of these NuGet packages: |
| 56 | + |
| 57 | +- **Selenium.WebDriver** — https://www.nuget.org/packages/Selenium.WebDriver/ |
| 58 | +- **Selenium.Support** — https://www.nuget.org/packages/Selenium.Support/ |
| 59 | + |
| 60 | +Then update the corresponding version variables in `eng/Versions.props`: |
| 61 | + |
| 62 | +- `SeleniumWebDriverVersion` |
| 63 | +- `SeleniumSupportVersion` |
| 64 | + |
| 65 | +### 2. Playwright packages |
| 66 | + |
| 67 | +Look up the latest stable version of the Playwright package: |
| 68 | + |
| 69 | +- **Microsoft.Playwright** — https://www.nuget.org/packages/Microsoft.Playwright/ |
| 70 | + |
| 71 | +Then update: |
| 72 | + |
| 73 | +- The `MicrosoftPlaywrightVersion` variable in `eng/Versions.props` |
| 74 | +- The Playwright Docker image tag in `src/Components/benchmarkapps/Wasm.Performance/dockerfile` — the image reference starts with `mcr.microsoft.com` and should use the matching version. |
| 75 | + |
| 76 | +### How to look up latest NuGet versions |
| 77 | + |
| 78 | +Use the NuGet MCP server's `get-latest-package-version` tool to look up each package: |
| 79 | +- `Selenium.WebDriver` |
| 80 | +- `Selenium.Support` |
| 81 | +- `Microsoft.Playwright` |
| 82 | + |
| 83 | +Do NOT use `curl`, `web-fetch`, or any direct HTTP requests to the NuGet API — they are blocked by the network firewall. |
| 84 | + |
| 85 | +## Guidelines |
| 86 | + |
| 87 | +- If all packages are already at their latest stable versions, report that no changes are needed. |
| 88 | +- Only update to **stable** releases — skip prerelease versions. |
| 89 | +- Keep Selenium.WebDriver and Selenium.Support on the same major version if possible. |
| 90 | +- Make sure the Playwright Docker image tag in the dockerfile is consistent with the `PlaywrightVersion` in `eng/Versions.props`. |
| 91 | +- Use the `edit` tool to modify files directly. Do NOT use `git commit`, `git push`, or `git config` commands — the `create-pull-request` safe output handles committing and pushing automatically. |
| 92 | + |
| 93 | +## Output |
| 94 | + |
| 95 | +When all edits are done, use the `create-pull-request` safe output to open the PR. Include a summary of what was updated in the PR body. |
| 96 | + |
| 97 | +After the PR is created, use the `add-comment` safe output to post the following note on the created PR: |
| 98 | + |
| 99 | +> **Note:** After merging, push all packages to dotnet-public repo by queuing a build from [dotnet-migrate-package](https://dev.azure.com/dnceng/internal/_build?definitionId=931&_a=summary). |
0 commit comments