diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3b3ff56 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + tests: + name: Tests + strategy: + matrix: + runs-on: + - ubuntu-latest + - macos-latest + - windows-latest + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - run: pip install '.[test]' + - run: pytest --pyargs healpix diff --git a/setup.cfg b/setup.cfg index 2cb7139..55c0157 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,3 +24,7 @@ packages = python_requires = >=3.6 install_requires = numpy + +[options.extras_require] +test = + pytest