-
Notifications
You must be signed in to change notification settings - Fork 13
84 lines (68 loc) · 1.88 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
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/[email protected]
- name: Setup gfortran
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 11
- name: Download GIS files
working-directory: examples
run: |
curl -LO https://github.com/EC-USGS/pywatershed/releases/download/v2022.0.1/pynhm_gis.zip
unzip pynhm_gis.zip
- 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
with:
environment-file: environment.yml
cache-environment: true
cache-downloads: true
- 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: Run tests
working-directory: autotest_exs
run: |
pytest -s -vv --durations=0