Skip to content

👷 Add GitHub Actions workflow for running pytest #10

👷 Add GitHub Actions workflow for running pytest

👷 Add GitHub Actions workflow for running pytest #10

Workflow file for this run

name: Run Tests
on: ['pull_request']
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11'] # Wrapped versions in quotes
name: Python ${{ matrix.python-version }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f pyproject.toml ]; then pip install .[dev]; fi
- name: Run tests
run: |
pytest --cov # Run pytest with coverage if needed