chore: update CI with decoupled way of running pytest (#114) #359
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- "!**" | |
workflow_call: | |
env: | |
POETRY_VERSION: 1.8.2 | |
jobs: | |
Tests: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
# TODO: re-enable 3.11 | |
PYTHON_VERSION: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.PYTHON_VERSION }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{env.POETRY_VERSION}} | |
installer-parallel: true | |
- name: Set up miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
channels: bioconda,conda-forge | |
activate-environment: prymer | |
environment-file: prymer.yml | |
channel-priority: true | |
auto-update-conda: true | |
auto-activate-base: false | |
python-version: ${{ matrix.PYTHON_VERSION }} | |
- name: Install the project's dependencies | |
shell: bash -el {0} | |
run: poetry install -v | |
- name: Install the task runner poethepoet | |
shell: bash -el {0} | |
run: poetry self add 'poethepoet[poetry_plugin]' | |
- name: Test the library | |
shell: bash -el {0} | |
run: poetry task check-all | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# Disabling build of docs on dev until we're done with refactoring | |
# - name: Test building the documentation | |
# shell: bash -el {0} | |
# run: poetry run mkdocs build --strict |