-
Notifications
You must be signed in to change notification settings - Fork 12
104 lines (84 loc) · 2.39 KB
/
ci_examples.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI example notebooks
on:
push:
branches:
- "*"
- "!v[0-9]+.[0-9]+.[0-9]+*"
pull_request:
branches:
- "*"
- "!v[0-9]+.[0-9]+.[0-9]+*"
jobs:
test:
name: ${{ matrix.os}} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.10"]
steps:
- name: Checkout repo
uses: actions/checkout@v2.4.0
- name: Setup gfortran
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 11
- name: Set environment variables
run: |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "SETUPTOOLS_ENABLE_FEATURES=legacy-editable" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1.9.0
with:
micromamba-version: '1.5.10-0'
environment-file: environment.yml
cache-environment: true
cache-downloads: true
- name: Checkout MODFLOW 6
uses: actions/checkout@v4
with:
repository: MODFLOW-USGS/modflow6
ref: develop
path: modflow6
- name: Update flopy MODFLOW 6 classes
working-directory: modflow6/autotest
run: |
python update_flopy.py
- name: Install mf6 nightly build binaries
uses: modflowpy/install-modflow-action@v1
with:
repo: modflow6-nightly-build
- name: Install error reporter
run: |
pip install pytest-github-actions-annotate-failures
- name: Install dependencies and this package
run: |
pip install -e .
- name: Version info
run: |
echo -------
conda info -a
echo -------
conda list
echo -------
pip -V
echo -------
pip list
- name: Import pywatershed
run: |
python -c "import pywatershed"
- name: Get GIS files for tests
run: |
python pywatershed/utils/gis_files.py
- name: Get additional domain files for notebooks
run: |
python pywatershed/utils/addtl_domain_files.py
- name: Run tests
working-directory: autotest_exs
run: |
pytest -s -vv --durations=0