Skip to content

Remove Python 3.6 support #115

Remove Python 3.6 support

Remove Python 3.6 support #115

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
name: tests
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]
jobs:
lint:
name: Lint Python code with flake8
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
- name: Lint with flake8
run: |
# 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
test:
name: Run unit and integrative tests
needs: [lint]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [3.7, 3.8]
exclude:
- os: macos-latest
python-version: 3.8
env:
PY_COV_VERSION: "3.7"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest codecov tox
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
- name: Install system dependencies
if: ${{ matrix.os != 'macos-latest' }}
run: |
sudo apt update;
sudo apt -y install gcc dpkg-dev zip git libz-dev default-jdk time time libssl-dev libsqlite3-dev \
autotools-dev libtool flex bison cmake automake autoconf \
python3-distutils python3-dev;
sudo apt install python-six -y;
- name: Setup Miniconda
if: ${{ matrix.os != 'macos-latest' }}
uses: conda-incubator/setup-miniconda@v2.0.1
with:
auto-update-conda: true
miniconda-version: 'latest'
activate-environment: ts-test
auto-activate-base: false
python-version: ${{ matrix.python-version }}
allow-softlinks: true
environment-file: ci/environment-test.yml
- name: Install dependencies not on conda
shell: bash -l {0}
if: ${{ matrix.os != 'macos-latest' }}
run: |
wget https://github.com/hallamlab/TreeSAPP/raw/master/treesapp/sub_binaries/BMGE.jar;
sudo mv BMGE.jar /usr/local/bin/;
wget -O od-seq.tar.gz http://www.bioinf.ucd.ie/download/od-seq.tar.gz; tar -xzf od-seq.tar.gz;
ODSEQ_SOURCES="OD-Seq/AliReader.cpp OD-Seq/Bootstrap.cpp OD-Seq/DistCalc.cpp OD-Seq/DistMatReader.cpp
OD-Seq/DistWriter.cpp OD-Seq/FastaWriter.cpp OD-Seq/IQR.cpp OD-Seq/ODseq.cpp OD-Seq/PairwiseAl.cpp
OD-Seq/Protein.cpp OD-Seq/ResultWriter.cpp OD-Seq/runtimeargs.cpp OD-Seq/util.cpp";
sudo g++ -fopenmp -o /usr/local/bin/OD-seq $ODSEQ_SOURCES;
rm od-seq.tar.gz;
- name: Run tox
if: ${{ matrix.os != 'macos-latest' }}
shell: bash -l {0}
run: |
echo $PATH
PYTHON_VERSION=$( echo ${{ matrix.python-version }} | sed 's/\.//g')
tox -e coverage-py${PYTHON_VERSION}-ts
if [ ${{ matrix.python-version }} == $PY_COV_VERSION ]; then tox -e coverage_report; fi
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == env.PY_COV_VERSION }} && ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
files: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: false
path_to_write_report: ./codecov_report.txt
verbose: true