Skip to content

pin numpy in environment.yml #95

pin numpy in environment.yml

pin numpy in environment.yml #95

Workflow file for this run

# This workflow will install Python dependencies, run lint and nose tests.
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: continuous integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
canceller:
runs-on: ubuntu-18.04
steps:
- name: cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
tests:
runs-on: ${{ matrix.os }}
defaults:
run:
# Use a login shell, so that ~/.bash_profile is executed and
# the conda environment gets initialised.
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
#python-version: [3.6, 3.8]
env:
CONDA_ENV_NAME: genomatnn
steps:
- uses: actions/checkout@v2
- name: find conda
id: find-conda
run: |
echo "::set-output name=CONDA::$CONDA"
- name: fix conda permissions
if: runner.os == 'macOS'
run: |
# Fix incorrect conda permissions on mac that prevent cache restore.
sudo chown -R $USER:staff $CONDA
- name: cache conda
id: cache
uses: actions/cache@v2
env:
# Increase this to reset the cache if the key hasn't changed.
CACHE_NUM: 0
with:
path: |
${{ steps.find-conda.outputs.CONDA }}/envs/${{ env.CONDA_ENV_NAME }}
~/.bash_profile
key: ${{ runner.os }}-${{ matrix.python }}-conda-${{ hashFiles('environment.yml', 'requirements.txt') }}-${{ env.CACHE_NUM }}
- name: install conda
uses: conda-incubator/setup-miniconda@v2
if: steps.cache.outputs.cache-hit != 'true'
with:
activate-environment: ${{ env.CONDA_ENV_NAME }}
environment-file: environment.yml
#python-version: ${{ matrix.python }}
channels: conda-forge
channel-priority: strict
auto-update-conda: true
use-only-tar-bz2: true
- name: move profile
if: steps.cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
run: |
# The setup-miniconda action leaves different shell init files for
# different OSes. Bash gives priority to ~/.bash_profile, so here we
# ensure that's used for all platforms.
mv ~/.profile ~/.bash_profile
- name: Build
run: |
python setup.py build_ext -i
- name: Lint with flake8
run: |
pip install flake8
# 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.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=89 --statistics
- name: Test with nose
run: |
nosetests -v tests