-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8ad65a
commit 471109f
Showing
3 changed files
with
40 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,11 +36,12 @@ jobs: | |
tox | ||
tox-gh | ||
- name: run tests suite | ||
run: tox -vv | ||
env: | ||
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }} | ||
CONDA_EXE: mamba | ||
- name: setup nox | ||
uses: wntrblm/[email protected] | ||
|
||
- name: run nox (tests and build) | ||
run: nox --force-python ${{ matrix.python-version }} | ||
|
||
|
||
- name: upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Nox.""" | ||
|
||
import nox | ||
|
||
PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
|
||
|
||
@nox.session(python=PYTHON_VERSIONS, venv_backend="mamba") | ||
def tests(session): | ||
"""Run tests with pytest, and collect coverage.""" | ||
session.conda_install("gdal>=3.3", channel=["conda-forge"]) | ||
session.install(".[dev,test]") | ||
|
||
session.run( | ||
"pytest", | ||
"-s", | ||
"--cov=pylandstats", | ||
"--cov-append", | ||
"--cov-report=xml", | ||
"--cov-report=term-missing", | ||
"tests", | ||
) | ||
|
||
|
||
@nox.session(name="build", venv_backend="mamba") | ||
def build(session): | ||
"""Build package and documentation.""" | ||
session.conda_install("gdal>=3.3", channel=["conda-forge"]) | ||
session.install(".[doc,dev,test]") | ||
|
||
session.run("python", "-m", "build") | ||
session.run("sphinx-build", "docs", "docs/_build") | ||
session.run("twine", "check", "dist/*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters