Skip to content

Update code cov, include ruff #47

Update code cov, include ruff

Update code cov, include ruff #47

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests and coverage
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
lint_and_format_check_with_ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: astral-sh/ruff-action@v3
with:
args: "format --check"
- uses: astral-sh/ruff-action@v3
with:
args: "check"
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[testing]"
- name: Test with pytest
run: |
pytest --cov=persim --cov-report=xml
- name: Upload coverage results
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: persim
verbose: true
fail_ci_if_error: true