Build in ngs_utils. Remove versionpy dep #8
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: CI | |
on: [push, pull_request] | |
jobs: | |
build-test-publish: | |
# For tag pushes, we want to assure only the tag event triggers CI, | |
# not the accompanying commit: | |
if: "! startsWith(github.event.head_commit.message, 'Bump ') || startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9. 3.10] | |
steps: | |
- uses: actions/checkout@master | |
- name: Add miniconda to PATH | |
run: echo "::add-path::${HOME}/miniconda3/bin" | |
- name: Setup conda | |
run: | | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ | |
--no-verbose -O miniconda.sh | |
bash miniconda.sh -b | |
conda config --set always_yes yes --set changeps1 no | |
conda install -c conda-forge mamba "python==${{ matrix.python-version }}.*" | |
mamba update conda | |
conda config --add channels vladsaveliev --add channels bioconda --add channels conda-forge | |
mamba install pip conda-build conda-verify anaconda-client | |
- name: Build package | |
run: | | |
mamba build conda/$(basename $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]') \ | |
--python=${{ matrix.python-version }} | |
- name: Install | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
run: mamba install --use-local $(basename $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]') | |
- name: Test | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
run: | | |
bed_annotation --help | |
nosetests --nocapture tests/test.py | |
- name: Upload to anaconda | |
if: "startsWith(github.ref, 'refs/tags/')" | |
run: | | |
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload ${HOME}/miniconda3/conda-bld/**/*.tar.bz2 |