-
Notifications
You must be signed in to change notification settings - Fork 10
67 lines (57 loc) · 1.56 KB
/
build.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test_package:
name: Test CDMS2 package
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest,macos-latest]
py: [3.6,3.7,3.8,3.9]
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/[email protected]
env:
CACHE_NUMBER: 1
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('test-environment.yml') }}
- uses: conda-incubator/[email protected]
with:
activate-environment: test
environment-file: test-environment.yml
python-version: ${{ matrix.py }}
auto-activate-base: false
miniforge-variant: Mambaforge
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
condarc-file: condarc
- name: Cache data
uses: actions/[email protected]
env:
CACHE_NUMBER: 4
with:
path: ~/envs/test/share/cdat/sample_data
key:
test-data-${{ env.CACHE_NUMBER }}
- name: conda info
run: |
conda info
conda list
- name: install package
run: |
python setup.py install
- name: run tests
run: |
pytest -vvv tests/ -n auto --ignore tests/test_forecast_io.py
pytest -vvv tests/test_forecast_io.py