Skip to content

Commit 14d85c0

Browse files
Install Mercurial on Windows runners via Chocolatey
Windows runners no longer ship with Mercurial pre-installed, causing test failures. This commit adds Mercurial installation using Chocolatey in the existing GnuPG setup step. Changes: - Add mercurial to the choco install command alongside gnupg - Update step name to reflect it now installs both GnuPG and Mercurial - Add explanatory comment about why Mercurial installation is needed This uses a modern, declarative approach via the Chocolatey package manager that's already in use for GnuPG installation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8c5cec9 commit 14d85c0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/python-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
msystem: MINGW64
6969
install: git mingw-w64-x86_64-python mingw-w64-x86_64-python-setuptools
7070
update: true
71-
- name: Setup GnuPG
71+
- name: Setup GnuPG and Mercurial on Windows
7272
# At present, the Windows VMs only come with the copy of GnuPG that's bundled
7373
# with Git for Windows. If we want to use this version _and_ be able to set
7474
# arbitrary GnuPG home directories, then the test would need to figure out when
@@ -84,11 +84,15 @@ jobs:
8484
# Additionally, we'll explicitly set `gpg.program` to ensure Git for Windows
8585
# doesn't invoke the bundled GnuPG, otherwise we'll run into
8686
# <https://dev.gnupg.org/T5504>. See also: <https://dev.gnupg.org/T3020>.
87+
#
88+
# Windows runners no longer ship with Mercurial pre-installed, so we install
89+
# it via Chocolatey using the 'hg' package.
8790
run: |
8891
$env:PATH = "C:\Program Files\Git\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin"
8992
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
90-
choco install gnupg -y --no-progress
93+
choco install gnupg hg -y --no-progress
9194
echo "C:\Program Files (x86)\gnupg\bin" >> $env:GITHUB_PATH
95+
echo "C:\Program Files\Mercurial\" >> $env:GITHUB_PATH
9296
git config --system gpg.program "C:\Program Files (x86)\gnupg\bin\gpg.exe"
9397
if: runner.os == 'Windows'
9498
- run: uv sync --group test --group docs --extra rich

0 commit comments

Comments
 (0)