2024-02-02 09:01:31 +00:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-07-31 22:50:24 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-02-02 09:01:31 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-07-31 22:50:24 +00:00
|
|
|
platform: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
|
|
|
numpy-version: ["<2.0.0", ">=2.0.0"]
|
2024-09-03 18:55:52 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2024-07-31 22:50:24 +00:00
|
|
|
exclude:
|
|
|
|
- numpy-version: "<2.0.0"
|
|
|
|
python-version: "3.10"
|
|
|
|
- numpy-version: "<2.0.0"
|
|
|
|
python-version: "3.11"
|
|
|
|
- platform: "macos-latest"
|
|
|
|
python-version: "3.10"
|
|
|
|
- platform: "macos-latest"
|
|
|
|
python-version: "3.11"
|
|
|
|
- platform: "windows-latest"
|
|
|
|
python-version: "3.10"
|
|
|
|
- platform: "windows-latest"
|
|
|
|
python-version: "3.11"
|
2024-02-02 09:01:31 +00:00
|
|
|
|
2024-07-31 22:59:46 +00:00
|
|
|
runs-on: ${{ matrix.platform }}
|
2024-02-02 09:01:31 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2024-07-31 23:11:42 +00:00
|
|
|
run: pip install -e ".[tests]"
|
2024-02-02 09:01:31 +00:00
|
|
|
|
2024-07-31 22:50:24 +00:00
|
|
|
- name: Install numpy version
|
|
|
|
run: pip install "numpy${{ matrix.numpy-version }}"
|
|
|
|
|
2024-02-02 09:01:31 +00:00
|
|
|
- name: Run Tests
|
|
|
|
run: pytest
|
|
|
|
|
2024-07-31 22:50:24 +00:00
|
|
|
- name: Coveralls Parallel
|
2024-07-31 23:04:10 +00:00
|
|
|
uses: coverallsapp/github-action@v2.3.0
|
2024-07-31 23:20:22 +00:00
|
|
|
if: runner.os != 'macOS'
|
2024-07-31 22:50:24 +00:00
|
|
|
with:
|
|
|
|
flag-name: run-${{ join(matrix.*, '-') }}
|
|
|
|
parallel: true
|
2024-07-31 23:11:42 +00:00
|
|
|
debug: true
|
2024-02-02 09:01:31 +00:00
|
|
|
|
2024-07-31 22:50:24 +00:00
|
|
|
finish-coverage:
|
|
|
|
needs: test
|
|
|
|
if: ${{ always() }}
|
2024-02-02 09:01:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-31 22:50:24 +00:00
|
|
|
- name: Coveralls Finished
|
2024-07-31 23:04:10 +00:00
|
|
|
uses: coverallsapp/github-action@v2.3.0
|
2024-07-31 22:50:24 +00:00
|
|
|
with:
|
|
|
|
parallel-finished: true
|