fix: update nbitk dependency version to >=0.5.3 in pyproject.toml #351
This file contains hidden or 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: Python package | |
on: | |
push: | |
branches: [ "main", "refactor" ] | |
tags: | |
- 'v*' # Trigger on any tag that starts with 'v' | |
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_validator | |
environment-file: environment.yml | |
auto-activate-base: false | |
- name: Install additional test dependencies | |
shell: bash -l {0} | |
run: | | |
conda activate barcode_validator | |
pip install pytest pytest-cov flake8 | |
pip install -e . | |
- name: Test environment | |
shell: bash -l {0} | |
run: | | |
conda activate barcode_validator | |
conda list | |
which python | |
which blastn | |
which hmmalign | |
- name: Lint with flake8 | |
shell: bash -l {0} | |
run: | | |
conda activate barcode_validator | |
# 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_validator | |
pytest --cov=barcode_validator --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 | |
publish: | |
needs: build # Only run if the build job passes | |
if: startsWith(github.ref, 'refs/tags/v') # Only run on tag pushes starting with 'v' | |
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_validator | |
environment-file: environment.yml | |
auto-activate-base: false | |
- name: Install build dependencies | |
shell: bash -l {0} | |
run: | | |
conda activate barcode_validator | |
pip install build twine | |
- name: Build package | |
shell: bash -l {0} | |
run: | | |
conda activate barcode_validator | |
python -m build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |