Skip to content

Run pytest and mypy

Run pytest and mypy #5

Workflow file for this run

name: Run pytest
on:
workflow_call:
inputs:
python-version:
type: string
required: false
default: "3.11"
package-directory:
type: string
required: true
workflow_dispatch:
inputs:
package-directory:
required: true
type: choice
options:
- pgscatalog.corelib
- pgscatalog.matchlib
- pgscatalog.calclib
- pgscatalog.downloadapp
- pgscatalog.combineapp
- pgscatalog.matchapp
- pgscatalog.calcapp
python-version:
required: false
default: '3.11'
type: string
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
- uses: actions/cache@v4
with:
path: ${{ inputs.package-directory }}/.venv
key: venv-${{ hashFiles('**/poetry.lock') }}
- run: pip install poetry
- run: poetry install --with dev --all-extras
working-directory: ${{ inputs.package-directory }}
- run: poetry run pytest --cov --cov-report xml
working-directory: ${{ inputs.package-directory }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: PGScatalog/pygscatalog
flags: ${{ inputs.package-directory }}