Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(tests): #1066

Merged
merged 4 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,66 @@ jobs:
- name: Meson test
run: meson test --verbose --no-rebuild -C builddir

smoke_test:
name: Smoke test (gfortran 12)
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
with:
path: modflow6

- name: Setup GNU Fortran ${{ env.GCC_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: modflow6/environment.yml
cache-downloads: true
cache-env: true

- name: Build modflow6
working-directory: modflow6
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir

- name: Update flopy
working-directory: modflow6/autotest
run: python update_flopy.py

- name: Get executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Test programs
working-directory: modflow6/autotest
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
pytest -v -n auto --durations 0 -m "not slow and not regression and not developmode"
else
pytest -v -n auto --durations 0 -S
fi

test_gfortran_latest:
name: Test (gfortran 12)
needs:
- lint
- build
- smoke_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -131,6 +186,8 @@ jobs:

- name: Test programs
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
pytest -v -n auto --durations 0 -m "not large and not developmode"
Expand All @@ -149,6 +206,7 @@ jobs:
needs:
- lint
- build
- smoke_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -205,6 +263,8 @@ jobs:

- name: Test modflow6
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
pytest -v -n auto --durations 0 -m "not large and not developmode"
Expand All @@ -217,6 +277,7 @@ jobs:
needs:
- lint
- build
- smoke_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -299,6 +360,8 @@ jobs:
- name: Test programs
if: runner.os != 'Windows'
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
pytest -v -n auto --durations 0 -m "not large and not developmode"
Expand All @@ -310,6 +373,8 @@ jobs:
if: runner.os == 'Windows'
working-directory: modflow6/autotest
shell: pwsh
env:
REPOS_PATH: ${{ github.workspace }}
run: |
if ( "${{ github.ref_name }}" -eq "master" ) {
pytest -v -n auto --durations 0 -m "not large and not developmode"
Expand Down
321 changes: 233 additions & 88 deletions DEVELOPER.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This repository contains an `./autotest` folder with python scripts for building

* [modflowpy/pymake](https://github.com/modflowpy/pymake)
* [modflowpy/flopy](https://github.com/modflowpy/flopy)
* [MODFLOW-USGS/modflow6-examples](https://github.com/MODFLOW-USGS/modflow6-examples)
* [MODFLOW-USGS/modflow6-testmodels](https://github.com/MODFLOW-USGS/modflow6-testmodels)
* [MODFLOW-USGS/modflow6-largetestmodels](https://github.com/MODFLOW-USGS/modflow6-largetestmodels)
* [MODFLOW-USGS/executables](https://github.com/MODFLOW-USGS/executables)
Expand Down
202 changes: 0 additions & 202 deletions autotest/binary_file_writer.py

This file was deleted.

Loading