Skip to content

Commit

Permalink
ci: fix developmode parallel test conditions (#1832)
Browse files Browse the repository at this point in the history
Apply 'not developmode' marker when testing parallel mf6 in test-par-win action...
* on master branch, generally
* if developmode is false in the release workflow
  • Loading branch information
wpbonelli authored May 20, 2024
1 parent 8b2745d commit 5832090
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/actions/test-par-win/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,24 @@ runs:
GITHUB_TOKEN: ${{ github.token }}
run: pixi run get-exes

- name: Convert unix2dos
shell: cmd
run: |
unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6.bat" "%TEMP%\test_modflow6.bat"
- name: Test programs
shell: cmd
if: github.ref_name != 'master'
shell: cmd
env:
REPOS_PATH: ${{ github.workspace }}
run: |
unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6.bat" "%TEMP%\test_modflow6.bat"
"%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6.bat"
- name: Test programs
if: github.ref_name == 'master'
shell: cmd
env:
REPOS_PATH: ${{ github.workspace }}
MARKERS: not developmode
run: |
"%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6.bat"
2 changes: 1 addition & 1 deletion .github/common/test_modflow6.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cd "%GITHUB_WORKSPACE%\modflow6\autotest"
where libpetsc.dll
ldd ..\bin\mf6
pixi run autotest --parallel -k "test_par"
pixi run autotest --parallel -k "test_par" -m "%MARKERS%"
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,15 @@ jobs:
uses: ./modflow6/.github/actions/build-par-win

- name: Build and test binaries (Windows)
if: runner.os == 'Windows' && matrix.parallel && inputs.run_tests
if: runner.os == 'Windows' && matrix.parallel && inputs.run_tests && inputs.developmode
uses: ./modflow6/.github/actions/test-par-win

- name: Build and test binaries (Windows)
if: runner.os == 'Windows' && matrix.parallel && inputs.run_tests && !inputs.developmode
uses: ./modflow6/.github/actions/test-par-win
env:
MARKERS: not developmode

- name: Copy deps to bin dir
if: runner.os == 'Windows' && matrix.parallel
working-directory: modflow6/bin
Expand Down
1 change: 1 addition & 0 deletions autotest/test_par_gwt_dsp01.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def check_output(idx, test):


@pytest.mark.parallel
@pytest.mark.developmode
@pytest.mark.parametrize("idx, name", enumerate(cases))
def test_mf6model(idx, name, function_tmpdir, targets):
test = TestFramework(
Expand Down

0 comments on commit 5832090

Please sign in to comment.