Skip to content

Commit

Permalink
Initial GitHub workflow to run unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Jun 14, 2024
1 parent dc03262 commit 14d818b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Unit tests"

on: [push]

jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [
# Just test lowest and highest supported versions for now
"3.8",
"3.12",
]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package with test dependencies
run: python -m pip install .[tests]
- name: Test with pytest
run: pytest
15 changes: 10 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ classifiers = [
]
keywords = ["ESA", "EO", "Earth observation", "openEO"]
dependencies = [
"requests",
"requests>=2.30.0",
]

[project.urls]
Expand All @@ -28,12 +28,12 @@ Issues = "https://github.com/ESA-APEx/esa-apex-toolbox-python/issues"

[project.optional-dependencies]
tests = [
"pytest",
"requests_mock",
"pytest>=8.2.0",
"requests_mock>=1.12.0",
]
dev = [
"pytest",
"requests_mock",
"pytest>=8.2.0",
"requests_mock>=1.12.0",
]

[tool.hatch.version]
Expand All @@ -47,3 +47,8 @@ profile = "black"

[tool.ruff]
line-length = 120

[tool.pytest.ini_options]
testpaths = [
"tests",
]

0 comments on commit 14d818b

Please sign in to comment.