Skip to content

Commit c9e5428

Browse files
committed
update gha
1 parent 82f9042 commit c9e5428

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v7
1313

1414
- name: Set up Python
15-
uses: actions/setup-python@v5
15+
uses: actions/setup-python@v7
1616
with:
1717
python-version: "3.x"
1818

19+
- name: Install mercurial
20+
# hg is no longer preinstalled on the ubuntu-latest runner image
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y --no-install-recommends mercurial
24+
hg --version
25+
1926
- name: Install dependencies
2027
run: pip install -e .
2128

‎codespeed/tests/test_commits.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
hgdir = ''
1414

15+
# hg aborts on commit when ui.username is unset, which is the case on a CI
16+
# runner with no ~/.hgrc, so supply one explicitly.
17+
HG_USER = ['-u', 'Codespeed Tests <tests@example.com>']
18+
1519
def setUpModule():
1620
global hgdir
1721
hgdir = tempfile.TemporaryDirectory()
@@ -22,11 +26,13 @@ def setUpModule():
2226
with open(readme, 'w') as hg_file:
2327
hg_file.write('readme')
2428
subprocess.check_call(['hg', 'add', readme], cwd=hgdir.name)
25-
subprocess.check_call(['hg', 'commit', '-m', "first commit"], cwd=hgdir.name)
29+
subprocess.check_call(['hg', 'commit', '-m', "first commit"] + HG_USER,
30+
cwd=hgdir.name)
2631
with open(file1, 'w') as hg_file:
2732
hg_file.write('value = 10')
2833
subprocess.check_call(['hg', 'add', file1], cwd=hgdir.name)
29-
subprocess.check_call(['hg', 'commit', '-m', "second commit"], cwd=hgdir.name)
34+
subprocess.check_call(['hg', 'commit', '-m', "second commit"] + HG_USER,
35+
cwd=hgdir.name)
3036

3137
def tearDownModule():
3238
hgdir.cleanup()

0 commit comments

Comments
 (0)