Skip to content

✨ add data for Guisandesa goats #272

✨ add data for Guisandesa goats

✨ add data for Guisandesa goats #272

name: Pytest Workflow
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
- devel
pull_request:
branches:
- master
- devel
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: SMARTER-database
channel-priority: strict
environment-file: environment.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Install dependencies
shell: bash -l {0}
run: |
make requirements
pip install coveralls
- name: Conda list
shell: pwsh
run: conda list
- name: Test with coverage
shell: bash -l {0}
run: coverage run --source src -m pytest
- name: Uploading coverage to coveralls
shell: bash -l {0}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}