2021-09-30 11:57:32 +00:00
|
|
|
name: build
|
2021-09-30 11:36:00 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Run Tests
|
2021-12-11 17:54:32 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-09-30 11:36:00 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash -l {0}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-12-11 17:50:30 +00:00
|
|
|
- name: Environment dependencies
|
|
|
|
run: |
|
2021-12-11 17:52:13 +00:00
|
|
|
sudo apt-get -y install libimage-exiftool-perl
|
2021-10-03 08:04:14 +00:00
|
|
|
- name: Cache conda
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
2021-10-03 08:38:37 +00:00
|
|
|
# Increase this value to reset cache if environment.yml has not changed
|
2021-10-03 08:04:14 +00:00
|
|
|
CACHE_NUMBER: 0
|
|
|
|
with:
|
|
|
|
path: ~/conda_pkgs_dir
|
|
|
|
key:
|
|
|
|
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
|
2021-10-03 08:38:37 +00:00
|
|
|
hashFiles('environment.yml') }}
|
2021-09-30 11:36:00 +00: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 08:04:14 +00:00
|
|
|
use-only-tar-bz2: true
|
2021-09-30 11:36:00 +00:00
|
|
|
- name: Conda Info
|
|
|
|
run: |
|
|
|
|
conda info
|
|
|
|
conda list
|
|
|
|
- name: Run Pytest
|
|
|
|
run: |
|
|
|
|
python -m pytest
|