-
Notifications
You must be signed in to change notification settings - Fork 47
68 lines (65 loc) · 2.21 KB
/
climpred_testing.yml
File metadata and controls
68 lines (65 loc) · 2.21 KB
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
68
name: climpred testing
on: pull_request_target
jobs:
test: # Runs testing suite on various python versions.
name: Test climpred, python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Install Conda environment
uses: conda-incubator/setup-miniconda@v1
with:
auto-update-conda: true
activate-environment: climpred-minimum-tests
environment-file: ci/requirements/minimum-tests.yml
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Conda list
shell: bash -l {0}
run: conda list
- name: Run tests
shell: bash -l {0}
run: |
conda activate climpred-minimum-tests
pytest --cov=climpred --cov-report=xml
- name: Upload coverage to codecov
uses: codecov/codecov-action@v1.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
docs_notebooks: # Checks that pre-compiled notebooks in docs still work.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Install Conda environment
uses: conda-incubator/setup-miniconda@v1
with:
auto-update-conda: true
activate-environment: climpred-docs-notebooks
environment-file: ci/requirements/docs_notebooks.yml
python-version: 3.6
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Conda list
shell: bash -l {0}
run: conda list
- name: Test notebooks in docs
shell: bash -l {0}
run: |
pushd docs
nbstripout source/*.ipynb source/examples/decadal/*.ipynb source/examples/subseasonal/*.ipynb
make html
popd