Skip to content

Tox integration & use in GitHub actions #341

Tox integration & use in GitHub actions

Tox integration & use in GitHub actions #341

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ main, develop, v0.2-staging ]
pull_request:
branches: [ main, develop, v0.2-staging ]
jobs:
build38:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8"]
numpy-version: ["1.18", "1.19"]
scipy-version: ["1.4"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip setuptools Cython
pip install numpy==${{ matrix.numpy-version }}
pip install scipy==${{ matrix.scipy-version }}
pip install -r requirements.txt
pip install -e .
pip install flake8 pytest pytest-cov
- name: Test with flake8
run: |
flake8
- name: Test with pytest
run: |
./tests/run-tests.sh
build39_310_311:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
numpy-version: ["1.24.3"]
scipy-version: ["1.10.1"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip setuptools Cython
pip install numpy==${{ matrix.numpy-version }}
pip install scipy==${{ matrix.scipy-version }}
pip install -r requirements.txt
pip install -e .
pip install flake8 pytest pytest-cov
- name: Lint with flake8
run: |
flake8
- name: Test with pytest
run: |
./tests/run-tests.sh