Skip to content

Run tests

Run tests #73

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- "*"
pull_request:
schedule:
# Run every Monday at 6am UTC
- cron: "0 6 * * 1"
jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Unit tests Python 3.7
os: macos-latest
python-version: 3.7
extras: test
test-command: pytest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file env/environment-${PYTHONVERSION}.yml --name sedkit-${{ matrix.python-version }}
env:
PYTHONVERSION: ${{ matrix.python-version }}
- name: Install package
run: |
pip install -e .[${{ matrix.extras }}]
- name: Update conda
run: |
conda update --all
- name: Test with pytest
run: |
conda run -n sedkit-${{ matrix.python-version }} pytest