Skip to content

Commit

Permalink
remove CI workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Oct 7, 2023
1 parent ae104d3 commit 7d4b0c4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 60 deletions.
47 changes: 13 additions & 34 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,14 @@ jobs:
run: |
pip install --upgrade pip
pip install .
pip install ".[test, optional]"
- name: Install executables
uses: modflowpy/install-modflow-action@v1

# todo restore below before merging
- name: Install MODFLOW 6 PRT build
pip install ".[test,optional]"
- name: Install Modflow executables
uses: modflowpy/install-modflow-action@v1
with:
# repo: modflow6-nightly-build
owner: aprovost-usgs
repo: modflow6

- name: Update FloPy packages
if: runner.os != 'Windows'
# run: python -c 'import flopy; flopy.mf6.utils.generate_classes(ref="develop", backup=False)'
run: python -c 'import flopy; flopy.mf6.utils.generate_classes(owner="aprovost-usgs", ref="PRT", backup=False)'

- name: Run smoke tests
working-directory: ./autotest
run: pytest -v -n=auto --smoke --durations=0 --keep-failed=.failed

- name: Smoke test
working-directory: autotest
run: pytest -v -n=auto --smoke --cov=flopy --cov-report=xml --durations=0 --keep-failed=.failed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -163,10 +150,7 @@ jobs:

test:
name: Test
needs:
- build
- lint
- smoke
needs: smoke
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -221,27 +205,22 @@ jobs:
pip install xmipy
pip install .
- name: Install executables
- name: Install Modflow-related executables
uses: modflowpy/install-modflow-action@v1

# todo restore below when prt merges to mf6 develop
- name: Install MODFLOW 6 PRT build
- name: Install Modflow dev build executables
uses: modflowpy/install-modflow-action@v1
with:
# repo: modflow6-nightly-build
owner: aprovost-usgs
repo: modflow6
repo: modflow6-nightly-build

- name: Update FloPy packages
if: runner.os != 'Windows'
# run: python -c 'import flopy; flopy.mf6.utils.generate_classes(ref="develop", backup=False)'
run: python -c 'import flopy; flopy.mf6.utils.generate_classes(owner="aprovost-usgs", ref="PRT", backup=False)'
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Update FloPy packages
if: runner.os == 'Windows'
shell: bash -l {0}
# run: python -c 'import flopy; flopy.mf6.utils.generate_classes(ref="develop", backup=False)'
run: python -c 'import flopy; flopy.mf6.utils.generate_classes(owner="aprovost-usgs", ref="PRT", backup=False)'
run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup

- name: Run tests
if: runner.os != 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
bash
powershell
- name: Install Python dependencies
- name: Install extra Python dependencies
if: runner.os == 'Windows'
shell: bash -l {0}
run: |
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/mf6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
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 .
pip install .[test,optional]
- name: Install gfortran
Expand All @@ -51,28 +50,32 @@ jobs:
- name: Checkout MODFLOW 6
uses: actions/checkout@v4
with:
repository: aprovost-usgs/modflow6
repository: MODFLOW-USGS/modflow6
path: modflow6
ref: PRT

- name: Update flopy MODFLOW 6 classes
working-directory: modflow6/autotest
run: python update_flopy.py
run: |
python update_flopy.py
- name: Install meson
run: pip3 install meson ninja
run: |
pip3 install meson ninja
- name: Setup modflow
working-directory: modflow6
run: meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
run: |
meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
- name: Build modflow
working-directory: modflow6
run: meson compile -C builddir
run: |
meson compile -C builddir
- name: Install modflow
working-directory: modflow6
run: meson install -C builddir
run: |
meson install -C builddir
- name: Get executables
working-directory: modflow6/autotest
Expand All @@ -88,10 +91,12 @@ jobs:
- name: Print coverage report before upload
working-directory: ./modflow6/autotest
run: coverage report
run: |
coverage report
- name: Upload coverage to Codecov
if: github.repository_owner == 'modflowpy' && (github.event_name == 'push' || github.event_name == 'pull_request')
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
16 changes: 1 addition & 15 deletions .github/workflows/rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ jobs:
run: python -m pip install --upgrade pip

- name: Install flopy and dependencies
run: |
pip install .
pip install ".[test, doc, optional]"
run: pip install ".[test, doc, optional]"

- name: Workaround OpenGL issue on Linux
if: runner.os == 'Linux'
Expand Down Expand Up @@ -79,18 +77,6 @@ jobs:
- name: Install MODFLOW executables
uses: modflowpy/install-modflow-action@v1

# todo restore below before merging
- name: Install MODFLOW 6 PRT build
uses: modflowpy/install-modflow-action@v1
with:
owner: aprovost-usgs
repo: modflow6

- name: Update FloPy
run: |
python -c 'from flopy.mf6.utils import generate_classes; generate_classes(owner="aprovost-usgs", ref="PRT", backup=False)'
pip install .
- name: Run tutorial and example notebooks
working-directory: autotest
run: pytest -v -n auto test_notebooks.py
Expand Down

0 comments on commit 7d4b0c4

Please sign in to comment.