Skip to content

Predictor fixes 2 (#55) #75

Predictor fixes 2 (#55)

Predictor fixes 2 (#55) #75

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Unit Tests
on:
push:
branches: ["main", "covassist_cleanup"]
pull_request:
branches: ["main", "covassist_cleanup"]
workflow_dispatch:
permissions:
contents: read
jobs:
unittest:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true # Enable LFS support
- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Cache Python virtual environment
uses: actions/[email protected]
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-python-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-python-
- name: Install Poetry
run: |
python3 -m pip install --upgrade pip
python3 -m pip install poetry
- name: Install dependencies
run: |
poetry install
- name: Run tests
run: |
source $(poetry env info --path)/bin/activate
spacy download en_core_web_sm
pytest
working-directory: ./convassist
- name: Upload coverage report
uses: actions/[email protected]
with:
name: coverage-report
path: |
convassist/htmlcov/
convassist/coverage.xml