Speed up & fix CI; better install docs (#69) #536
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
# Based roughly on the main.yml and standalone.yml workflows in | |
# https://github.com/biocore/empress/blob/master/.github/workflows/, | |
# https://docs.github.com/en/actions/quickstart, and | |
# https://github.com/fedarko/wotplot/blob/ce702b63bf790c41d02b0493e3a7eebda6fcec70/.github/workflows/main.yml | |
# (which i based off of this file originally, so it's an ouroboros of me | |
# copying code from myself because i can never remember how yaml works) | |
name: strainFlye CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# For now (https://github.com/alimanfoo/pysamstats/blob/master/setup.py), | |
# it seems like pysamstats + pysam only works with Python 3.7 and lower. | |
# Ideally we could un-pin this eventually -- I suspect pysamstats being | |
# able to work with pysam 0.16 and up will remove this restriction. | |
strategy: | |
matrix: | |
python-version: [3.6, 3.7] | |
steps: | |
# Updating from v2 to v3 to match, as of writing, | |
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
- name: Check out code | |
uses: actions/checkout@v3 | |
# https://github.com/mamba-org/setup-micromamba | |
- name: Install conda dependencies with mamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
create-args: python=${{ matrix.python-version }} | |
init-shell: bash | |
- name: Install strainFlye (and pip dependencies) | |
run: pip install -e .[dev] | |
shell: bash -el {0} | |
- name: Lint and stylecheck | |
run: make stylecheck | |
shell: bash -el {0} | |
- name: Run tests | |
run: make test | |
shell: bash -el {0} | |
- name: Check that the strainFlye CLI seems good | |
run: strainFlye | |
shell: bash -el {0} | |
- name: Upload code coverage information to Codecov | |
uses: codecov/codecov-action@v2 |