Skip to content

Travis2githubactions #7

Travis2githubactions

Travis2githubactions #7

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y conda
conda create -n test-env python=${{ matrix.python-version }} -y
conda activate test-env
conda install -c bioconda -c conda-forge pip pytest fastspar>=0.0.7 armadillo=8 "scipy<=1.10.1,>=1.8.0" numpy networkx biom-format pandas scikit-bio statsmodels h5py
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py install
- name: Test with pytest
run: |
python -m pytest tests/