Skip to content

Commit 9566636

Browse files
committed
support tox-gh with Pythoin3.14, upstream raven-hydro config simplification
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
1 parent 9c4bb64 commit 9566636

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
python -m tox -e lint
5757
5858
pip:
59-
name: Test with Python${{ matrix.python-version }} (tox, ${{ matrix.os }}), upstream=${{ matrix.upstream-branch }})
59+
name: Test with Python${{ matrix.python-version }} (tox, ${{ matrix.os }}), raven-hydro=${{ matrix.raven-hydro-upstream-branch }})
6060
needs: lint
6161
runs-on: ${{ matrix.os }}
6262
strategy:
@@ -67,6 +67,7 @@ jobs:
6767
include:
6868
- os: 'ubuntu-latest'
6969
python-version: '3.10'
70+
raven-hydro-upstream-branch: "main"
7071
steps:
7172
- name: Harden Runner
7273
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
@@ -126,7 +127,7 @@ jobs:
126127
python3 -m tox
127128
env:
128129
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
129-
UPSTREAM_BRANCH: ${{ matrix.upstream-branch }}
130+
RAVEN_HYDRO_UPSTREAM_BRANCH: ${{ matrix.raven-hydro-upstream-branch }}
130131

131132
- name: Report Coverage
132133
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7

tox.toml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,17 @@ commands = [
3838
commands_post = []
3939
allowlist_externals = ["make"]
4040

41-
[env.upstream]
42-
description = "Run tests with pytest under {basepython} for upstream libraries"
43-
commands_pre = [
44-
["python", "-m", "pip", "list"],
45-
["python", "-m", "pip", "check"],
46-
["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-binary", "raven-hydro", "git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH}"]
47-
]
48-
4941
[env_run_base]
5042
description = "Run tests with pytest under {basepython}"
51-
setenv = {PYTEST_ADDOPTS = "--color=yes --numprocesses=logical --durations=10 --cov=ravenpy --cov-report=lcov", PYTHONPATH = "{toxinidir}", TOX = "{envname}", UPSTREAM_BRANCH = "main"}
52-
passenv = ["CI", "COVERALLS_*", "GDAL_VERSION", "GITHUB_*", "LD_LIBRARY_PATH", "RAVEN_*", "UPSTREAM_BRANCH"]
43+
setenv = {PYTEST_ADDOPTS = "--color=yes --numprocesses=logical --durations=10 --cov=ravenpy --cov-report=lcov", PYTHONPATH = "{toxinidir}", TOX = "{envname}"}
44+
passenv = ["CI", "COVERALLS_*", "GDAL_VERSION", "GITHUB_*", "LD_LIBRARY_PATH", "RAVEN_*"]
5345
download = true
5446
install_command = ["python", "-m", "pip", "install", "--no-user", "{opts}", "{packages}"]
5547
dependency_groups = ["test"]
5648
extras = ["raven-hydro"]
49+
deps = [
50+
{replace = "if", condition = "env.RAVEN_HYDRO_UPSTREAM_BRANCH", then = ["git+https://github.com/Ouranosinc/raven-hydro.git@{env:RAVEN_HYDRO_UPSTREAM_BRANCH}"], extend = true}
51+
]
5752
commands_pre = [
5853
["python", "-m", "pip", "list"],
5954
["python", "-m", "pip", "check"]
@@ -67,7 +62,8 @@ commands_post = [
6762
]
6863

6964
[gh.python]
70-
"3.10" = ["upstream"]
65+
"3.10" = ["py3.10"]
7166
"3.11" = ["py3.11"]
7267
"3.12" = ["py3.12"]
7368
"3.13" = ["py3.13"]
69+
"3.14" = ["py3.14"]

0 commit comments

Comments
 (0)