numpydantic/.github/workflows/tests.yml

68 lines
No EOL
1.6 KiB
YAML

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
platform: ["ubuntu-latest", "macos-latest", "windows-latest"]
numpy-version: ["<2.0.0", ">=2.0.0"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
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"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: pip install -e ".[tests]"
- name: Install numpy version
run: pip install "numpy${{ matrix.numpy-version }}"
- name: Run Tests
run: pytest
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2.3.0
if: runner.os != 'macOS'
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
debug: true
finish-coverage:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.3.0
with:
parallel-finished: true