Add PRT support #1402
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: FloPy Modflow6 continuous integration | |
on: | |
schedule: | |
- cron: '0 8 * * *' # run at 8 AM UTC (12 am PST) | |
push: | |
branches: | |
- master | |
- develop | |
- release* | |
- ci-diagnose* | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
test: | |
name: Modflow6 FloPy tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout flopy repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
cache-dependency-path: pyproject.toml | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install https://github.com/modflowpy/pymake/zipball/master | |
pip install https://github.com/Deltares/xmipy/zipball/develop | |
pip install https://github.com/MODFLOW-USGS/modflowapi/zipball/develop | |
pip install .[test,optional] | |
- name: Install gfortran | |
uses: modflowpy/install-gfortran-action@v1 | |
- name: Checkout MODFLOW 6 | |
uses: actions/checkout@v3 | |
with: | |
repository: MODFLOW-USGS/modflow6 | |
path: modflow6 | |
- name: Update flopy MODFLOW 6 classes | |
working-directory: modflow6/autotest | |
run: | | |
python update_flopy.py | |
- name: Install meson | |
run: | | |
pip3 install meson ninja | |
- name: Setup modflow | |
working-directory: modflow6 | |
run: | | |
meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin | |
- name: Build modflow | |
working-directory: modflow6 | |
run: | | |
meson compile -C builddir | |
- name: Install modflow | |
working-directory: modflow6 | |
run: | | |
meson install -C builddir | |
- name: Get executables | |
working-directory: modflow6/autotest | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
pytest -v --durations=0 get_exes.py | |
- name: Run tests | |
working-directory: modflow6/autotest | |
run: | | |
pytest -v -n auto -k "test_gw" --durations=0 --cov=flopy --cov-report=xml | |
- name: Print coverage report before upload | |
working-directory: ./modflow6/autotest | |
run: | | |
coverage report | |
- name: Upload coverage to Codecov | |
if: | |
github.repository_owner == 'modflowpy' && (github.event_name == 'push' || github.event_name == 'pull_request') | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./modflow6/autotest/coverage.xml |