Skip to content

big tree by @domivika #18

big tree by @domivika

big tree by @domivika #18

name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Important for setuptools_scm to determine the version
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: barcode-constrained-phylogeny-backbone
environment-file: environment.yml
auto-activate-base: false
- name: Install additional test dependencies
shell: bash -l {0}
run: |
conda activate barcode-constrained-phylogeny-backbone
pip install pytest pytest-cov flake8
pip install -e .
- name: Test environment
shell: bash -l {0}
run: |
conda activate barcode-constrained-phylogeny-backbone
conda list
which python
which iqtree
which raxml-ng
which raxmlHPC
- name: Lint with flake8
shell: bash -l {0}
run: |
conda activate barcode-constrained-phylogeny-backbone
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
conda activate barcode-constrained-phylogeny-backbone
pytest --cov=barcode-constrained-phylogeny-backbone --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false