Skip to content

Commit

Permalink
Add github actions workflow to check that pytest --collect-only wor…
Browse files Browse the repository at this point in the history
…ks (#34)
  • Loading branch information
soxofaan authored Jan 22, 2024
1 parent 76191e9 commit f050b53
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pytest-collect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pytest-collect

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
pytest-collect:
name: "Pytest: check test collection"
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: "pytest: check test collection"
run: pytest --collect-only
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Dask = [
testpaths = [
"src/openeo_test_suite/tests",
]
addopts = [
"--import-mode=importlib",
]
filterwarnings = [
"ignore:(pkg_resources|jsonschema.RefResolver):DeprecationWarning",
]
5 changes: 3 additions & 2 deletions src/openeo_test_suite/tests/collections/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from stac_validator import stac_validator

from openeo_test_suite.lib.backend_under_test import get_collection_ids

from .openeo_api_collection_tests import OpeneoApiCollectionTests
from openeo_test_suite.tests.collections.openeo_api_collection_tests import (
OpeneoApiCollectionTests,
)

_log = logging.getLogger(__name__)

Expand Down

0 comments on commit f050b53

Please sign in to comment.