Skip to content

Commit 5ca3d5e

Browse files
authored
Merge pull request #19 from jnnr/feature-add-ci-testing
Add CI testing
2 parents ff9f877 + 20539b2 commit 5ca3d5e

3 files changed

Lines changed: 41 additions & 2 deletions

File tree

.github/workflows/ci-tests.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI - Pytest Develop
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
# Jobs definition
13+
runs-on: ${{ matrix.os }}
14+
if: ${{ !github.event.pull_request.draft }}
15+
strategy:
16+
max-parallel: 1
17+
matrix:
18+
os: [ubuntu-latest]
19+
python-version: ['3.13']
20+
name: pytest (Python ${{ matrix.python-version }}) (OS ${{ matrix.os }})
21+
22+
# Configure tests
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -e ".[dev]"
33+
- name: Test with pytest
34+
run: |
35+
pytest -vv

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
description = "A library for spatial aggregation and disaggregation"
77
readme = "README.md"
88
version = "0.0.3.dev"
9-
dynamic = ["dependencies"]
9+
dynamic = ["dependencies", "optional-dependencies"]
1010

1111
# complete classifier list:
1212
# http://pypi.org/classifiers/
@@ -38,6 +38,9 @@ gregor = "gregor.cli:cli"
3838
[tool.setuptools.dynamic]
3939
dependencies = { file = ["requirements/base.txt"] }
4040

41+
[tool.setuptools.dynamic.optional-dependencies]
42+
dev = { file = ["requirements/dev.txt"] }
43+
4144
[tool.ruff]
4245
builtins = ["ellipsis"]
4346
target-version = "py38"

requirements/dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
mkdocs-material
22
mkdocstrings[python]
33
mkdocs-jupyter
4-
mkdocstrings-python
4+
mkdocstrings-python
5+
pytest

0 commit comments

Comments
 (0)