Skip to content

tests

tests #124

Workflow file for this run

name: tests
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
env:
IMPERANDI_OPENAI_API_KEY: ${{ secrets.IMPERANDI_OPENAI_API_KEY }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e ".[segment,dev]"
- name: Run lint
run: |
python -m ruff check .
- name: Run tests
run: |
python -m pytest -m "not slow" --cov=imperandi --cov-report=xml --cov-fail-under=40
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false