diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 0000000..422ac28 --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,36 @@ +name: ci + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + py-version: + - '3.11' # Oldest supported + - '3.14' # Latest stable + name: Python ${{ matrix.py-version }} + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Use Python ${{ matrix.py-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.py-version }} + architecture: x64 + + - name: Install SCIMES + run: | + pip install -r pip-requirements + pip install . + + - name: Run tests + run: | + # use pytest -vv -x for debugging + pytest diff --git a/pip-requirements b/pip-requirements index a42b563..8483bb5 100644 --- a/pip-requirements +++ b/pip-requirements @@ -2,3 +2,4 @@ astropy>=1.0.2 matplotlib>=1.4.0 astrodendro>=0.1.0 scikit-learn>=0.15.2 +pytest diff --git a/setup.cfg b/setup.cfg index 10d7809..16ebe29 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,11 +7,6 @@ all_files = 1 upload-dir = docs/_build/html show-response = 1 -[pytest] -minversion = 2.2 -norecursedirs = build docs/_build -doctest_plus = enabled - [ah_bootstrap] auto_use = True diff --git a/tests/dummy_test.py b/tests/dummy_test.py new file mode 100644 index 0000000..a9cf961 --- /dev/null +++ b/tests/dummy_test.py @@ -0,0 +1,7 @@ +import pytest + +def test_dummy(): # pytest automatically calls functions with name starting with test + assert True + +def test_dummy_failing(): + assert False