Skip to content

Commit 912dc24

Browse files
Copilotahyangyi
andcommitted
Activate venvs in CI and update requires-python to >=3.12.10
Fix CI failures where `uv run` re-resolved dependencies against requires-python>=3.9, conflicting with grf-py's >=3.12.10 requirement. - Activate venv via GITHUB_ENV/GITHUB_PATH so subsequent steps use it - Update requires-python to >=3.12.10 to match grf-py requirement - Use direct pytest/make commands since venv is activated Co-authored-by: ahyangyi <700956+ahyangyi@users.noreply.github.com> Agent-Logs-Url: https://github.com/ahyangyi/agrf/sessions/50cc3807-9657-4883-befe-6f5c5e55cadb
1 parent 807fea9 commit 912dc24

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ jobs:
1717
uses: astral-sh/setup-uv@v4
1818
- name: Set up Python 3.12.10
1919
run: uv python install 3.12.10
20-
- name: Create virtual environment
21-
run: uv venv --python 3.12.10
20+
- name: Create and activate virtual environment
21+
run: |
22+
uv venv --python 3.12.10
23+
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
24+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
2225
- name: Install dependencies
2326
run: uv pip install .
2427
- name: Build

.github/workflows/sphinx-gh-pages.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,17 @@ jobs:
3131
- name: Set up Python 3.12.10
3232
run: uv python install 3.12.10
3333

34-
- name: Create virtual environment
35-
run: uv venv --python 3.12.10
34+
- name: Create and activate virtual environment
35+
run: |
36+
uv venv --python 3.12.10
37+
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
38+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
3639
3740
- name: Install dependencies
3841
run: uv pip install ".[doc]"
3942

4043
- name: Build documentation
41-
run: uv run make doc
44+
run: make doc
4245

4346
- name: Setup Pages
4447
uses: actions/configure-pages@v5

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ jobs:
3030
uses: astral-sh/setup-uv@v4
3131
- name: Set up Python 3.12.10
3232
run: uv python install 3.12.10
33-
- name: Create virtual environment
34-
run: uv venv --python 3.12.10
33+
- name: Create and activate virtual environment
34+
run: |
35+
uv venv --python 3.12.10
36+
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
37+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
3538
- name: Install dependencies
3639
run: uv pip install ".[test]"
3740
- name: Test agrf with coverage
38-
run: uv run pytest
41+
run: pytest

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
]
77
description = "Ahyangyi's OpenTTD NewGRF Toolkit"
88
readme = "README.md"
9-
requires-python = ">=3.9"
9+
requires-python = ">=3.12.10"
1010
classifiers = [
1111
"Development Status :: 3 - Alpha",
1212
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)