Skip to content

Fix bug; add tests

Fix bug; add tests #1

Workflow file for this run

name: python-pytest
on:
push:
branches:
- main
paths:
- packages/python/openproblems/**
pull_request:
paths:
- packages/python/openproblems/**
jobs:
linting:
runs-on: ubuntu-latest
strategy:
matrix:
tox-env: [black, flake8]
steps:
- uses: actions/checkout@v4
- name: Using Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install tox
run: python -m pip install tox
- name: Run tox env ${{ matrix.tox-env }}
run: tox -e ${{ matrix.tox-env }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install tox
- name: Test
run: |
PYTHON_ENV="${{ matrix.python-version }}"
PYTHON_ENV_NO_DOTS=${PYTHON_ENV//.}
tox run --skip-env '^(?!py'$PYTHON_ENV_NO_DOTS').+'