-
Notifications
You must be signed in to change notification settings - Fork 18
67 lines (60 loc) · 1.81 KB
/
test.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
# Based on github template: https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
name: Tests
on:
schedule:
- cron: '0 0 * * *' # run every Monday at 9 AM UTC (3 am PST)
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: ['3.11']
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Fetch all Git tags
run: git fetch --prune --unshallow --tags
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: installation/environment.yml
cache-environment: false
cache-downloads: false
# persist on the same day.
# cache-environment-key: environment-${{ steps.date.outputs.date }}
# cache-downloads-key: downloads-${{ steps.date.outputs.date }}
create-args: >-
python=${{ matrix.python-version }}
init-shell: >-
bash
powershell
- name: Conda info
shell: bash -l {0}
run: micromamba info
- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1
with:
path: ~/.local/bin
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Modflow version
shell: bash -l {0}
run: mf6 --version
- name: Install ipykernel
shell: bash -l {0}
run: |
python -m ipykernel install --user --name pyclass --display-name "pyclass"
- name: Conda list
shell: bash -l {0}
run: micromamba list
- name: Run tests
shell: bash -l {0}
run: |
pytest tests -v