-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.31 KB
/
conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Test in conda env
on:
push:
branches: master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: "birdfeeder"
auto-activate-base: false
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
# Check for environment.yml changes
- name: Cache conda dependencies
id: conda
uses: actions/cache@v2
env:
# Increase this value to manually reset cache if needed
CONDA_CACHE_NUMBER: 0
with:
path: |
~/conda_pkgs_dir
/usr/share/miniconda/envs
key: ${{ runner.os }}-conda-${{ env.CONDA_CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Run install script
# Only need to run install when deps has been changed
if: steps.conda.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
./install
- name: Show conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: Run pytest
shell: bash -l {0}
run: pytest tests/