2021-09-30 13:57:32 +02:00
|
|
|
name: build
|
2021-09-30 13:36:00 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Run Tests
|
2021-10-03 09:38:39 +02:00
|
|
|
runs-on: "macos-latest"
|
2021-09-30 13:36:00 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash -l {0}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-03 10:04:14 +02:00
|
|
|
- name: Cache conda
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
2021-10-03 10:38:37 +02:00
|
|
|
# Increase this value to reset cache if environment.yml has not changed
|
2021-10-03 10:04:14 +02:00
|
|
|
CACHE_NUMBER: 0
|
|
|
|
with:
|
|
|
|
path: ~/conda_pkgs_dir
|
|
|
|
key:
|
|
|
|
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
|
2021-10-03 10:38:37 +02:00
|
|
|
hashFiles('environment.yml') }}
|
2021-09-30 13:36:00 +02:00
|
|
|
- uses: conda-incubator/setup-miniconda@v2
|
|
|
|
with:
|
|
|
|
activate-environment: test
|
|
|
|
environment-file: environment.yml
|
|
|
|
python-version: 3.8
|
|
|
|
auto-activate-base: false
|
2021-10-03 10:04:14 +02:00
|
|
|
use-only-tar-bz2: true
|
2021-09-30 13:36:00 +02:00
|
|
|
- name: Conda Info
|
|
|
|
run: |
|
|
|
|
conda info
|
|
|
|
conda list
|
|
|
|
- name: Run Pytest
|
|
|
|
run: |
|
|
|
|
python -m pytest
|