diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 33b3759..3f2a5d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,8 @@ on: push: pull_request: branches: [ main ] - +env: + PYTEST_RUN_PATH: $GITHUB_WORKSPACE\..\tests # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -44,4 +45,6 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' - name: Activate env and Test with pytest + env: + PYTEST_PLUGINS: pytest_github_actions_annotate_failures run: poetry run pytest diff --git a/poetry.lock b/poetry.lock index f5cc786..3c6a096 100644 --- a/poetry.lock +++ b/poetry.lock @@ -822,6 +822,20 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +[[package]] +name = "pytest-github-actions-annotate-failures" +version = "0.2.0" +description = "pytest plugin to annotate failed tests with a workflow command for GitHub Actions" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-github-actions-annotate-failures-0.2.0.tar.gz", hash = "sha256:844ab626d389496e44f960b42f0a72cce29ae06d363426d17ea9ae1b4bef2288"}, + {file = "pytest_github_actions_annotate_failures-0.2.0-py3-none-any.whl", hash = "sha256:8bcef65fed503faaa0524b59cfeccc8995130972dd7b008d64193cc41b9cde85"}, +] + +[package.dependencies] +pytest = ">=4.0.0" + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -1142,4 +1156,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "fce0098b4146dc7bdccc33622928b2223644b4d69d33ad11a5647ea792f4abb0" +content-hash = "6e29171ab25ed9ab2f77735ba37b8cae6671fac9443eb5fc7dcf68f29583034c" diff --git a/pyproject.toml b/pyproject.toml index 39cb9ec..0401537 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ scipy = "^1.11.3" netcdf4 = "^1.6.4" wheel = "^0.41.2" setuptools = "^70.0.0" +pytest-github-actions-annotate-failures = "^0.2.0" [build-system]