Skip to content

Commit 5b49d43

Browse files
authored
Add upstream-dev CI (#51)
Fixes #50
1 parent 330bd40 commit 5b49d43

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,34 @@ jobs:
5252
env_vars: OS,PYTHON
5353
name: codecov-umbrella
5454
fail_ci_if_error: false
55+
56+
upstream-dev:
57+
name: upstream-dev
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v2
61+
- name: Cache conda
62+
uses: actions/cache@v1
63+
env:
64+
# Increase this value to reset cache if ci/upstream-dev-env.yml has not changed
65+
CACHE_NUMBER: 0
66+
with:
67+
path: ~/conda_pkgs_dir
68+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/upstream-dev-env.yml') }}
69+
- uses: goanpeca/setup-miniconda@v1
70+
with:
71+
activate-environment: cf_xarray_test # Defined in ci/upstream-dev-env.yml
72+
auto-update-conda: false
73+
python-version: 3.8
74+
environment-file: ci/upstream-dev-env.yml
75+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
76+
- name: Set up conda environment
77+
shell: bash -l {0}
78+
run: |
79+
python -m pip install -e .
80+
conda list
81+
82+
- name: Run Tests
83+
shell: bash -l {0}
84+
run: |
85+
pytest

ci/upstream-dev-env.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: cf_xarray_test
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- pytest-cov
6+
- pytest
7+
- dask
8+
- matplotlib
9+
- netcdf4
10+
- pip:
11+
- git+https://github.com/pydata/xarray

0 commit comments

Comments
 (0)