Skip to content

build: migrate from setup.py to pyproject.toml and set up CI #7

build: migrate from setup.py to pyproject.toml and set up CI

build: migrate from setup.py to pyproject.toml and set up CI #7

Workflow file for this run

name: Test with pytest
on: [pull_request, workflow_call]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda install -y -n base -c conda-forge -c bioconda bcftools
# Install pip and pytest
- name: Install pytest and trtools
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov trtools
- name: Test with pytest
run: |
bcftools --help
python -m pytest --cov=. --cov-report term-missing --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}