From 5832090721473bad8b1951c6e1915e8b93c803b6 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 20 May 2024 12:38:41 -0400 Subject: [PATCH] ci: fix developmode parallel test conditions (#1832) 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 --- .github/actions/test-par-win/action.yml | 18 ++++++++++++++++-- .github/common/test_modflow6.bat | 2 +- .github/workflows/release.yml | 8 +++++++- autotest/test_par_gwt_dsp01.py | 1 + 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/actions/test-par-win/action.yml b/.github/actions/test-par-win/action.yml index 7710c058b70..27e5e274223 100644 --- a/.github/actions/test-par-win/action.yml +++ b/.github/actions/test-par-win/action.yml @@ -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" diff --git a/.github/common/test_modflow6.bat b/.github/common/test_modflow6.bat index 1ea8626f126..2707f6d8c83 100644 --- a/.github/common/test_modflow6.bat +++ b/.github/common/test_modflow6.bat @@ -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%" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf1a7850176..79039e50456 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/autotest/test_par_gwt_dsp01.py b/autotest/test_par_gwt_dsp01.py index dbdee7a26f9..d3c633f805c 100644 --- a/autotest/test_par_gwt_dsp01.py +++ b/autotest/test_par_gwt_dsp01.py @@ -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(