From e60412ae11a086d7291fbc892fdaecb06ea65796 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Tue, 18 Jun 2024 17:08:45 -0500 Subject: [PATCH] ci: fix schedule for windows (#193) --- .github/workflows/ci.yml | 37 ++++++++++++++++++------------------- autotest/test_cli_cmds.py | 6 +++--- pixi.toml | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49a8001..70c4869 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,19 +27,19 @@ jobs: matrix: include: # test latest gcc and python - - {os: ubuntu-latest, FC: gcc, FC_V: 13} - - {os: macos-latest, FC: gcc, FC_V: 13} - - {os: windows-latest, FC: gcc, FC_V: 13} + - {os: ubuntu-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: macos-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: windows-latest, FC: gcc, FC_V: 13, shell: pwsh} # test latest python and intel-classic - - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7} - - {os: macos-13, FC: intel-classic, FC_V: 2021.7} - - {os: windows-2019, FC: intel-classic, FC_V: 2021.7} + - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: macos-13, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: windows-2019, FC: intel-classic, FC_V: 2021.7, shell: pwsh} # test latest python and previous gcc - - {os: ubuntu-latest, FC: gcc, FC_V: 12} - - {os: ubuntu-latest, FC: gcc, FC_V: 11} + - {os: ubuntu-latest, FC: gcc, FC_V: 12, shell: bash} + - {os: ubuntu-latest, FC: gcc, FC_V: 11, shell: bash} defaults: run: - shell: bash + shell: ${{ matrix.shell }} steps: - name: Checkout repo @@ -91,7 +91,6 @@ jobs: - name: test on Windows if: runner.os == 'Windows' - shell: pwsh run: | pixi run autotest-base @@ -122,16 +121,16 @@ jobs: matrix: include: # test latest gcc and python - - {os: ubuntu-latest, FC: gcc, FC_V: 13} - - {os: macos-latest, FC: gcc, FC_V: 13} - - {os: windows-latest, FC: gcc, FC_V: 13} + - {os: ubuntu-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: macos-latest, FC: gcc, FC_V: 13, shell: bash} + - {os: windows-latest, FC: gcc, FC_V: 13, shell: pwsh} # test latest python and intel - - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7} - - {os: macos-13, FC: intel-classic, FC_V: 2021.7} - - {os: windows-2019, FC: intel-classic, FC_V: 2021.7} + - {os: ubuntu-latest, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: macos-13, FC: intel-classic, FC_V: 2021.7, shell: bash} + - {os: windows-2019, FC: intel-classic, FC_V: 2021.7, shell: pwsh} defaults: run: - shell: bash + shell: ${{ matrix.shell }} steps: - name: Checkout repo @@ -170,13 +169,13 @@ jobs: - name: Run scheduled tests run: | pixi run autotest-schedule - + - name: Upload failed test output if: failure() uses: actions/upload-artifact@v4 with: name: failed-schedule-${{ matrix.os }}-${{ matrix.FC }}-${{ matrix.FC_V }} - path: ./autotest/.failed + path: autotest/.failed - name: Print coverage report before upload run: | diff --git a/autotest/test_cli_cmds.py b/autotest/test_cli_cmds.py index 4e63589..6465f5d 100644 --- a/autotest/test_cli_cmds.py +++ b/autotest/test_cli_cmds.py @@ -51,7 +51,7 @@ def test_make_program(function_tmpdir, target: str) -> None: "make-program", target, "--appdir", - str(function_tmpdir), + ".", "--verbose", ] run_cli_cmd(cmd) @@ -68,7 +68,7 @@ def test_make_program_double(function_tmpdir) -> None: "--double", "--verbose", "--appdir", - str(function_tmpdir), + ".", ] run_cli_cmd(cmd) @@ -81,7 +81,7 @@ def test_make_program_all(module_tmpdir) -> None: "make-program", ":", "--appdir", - str(module_tmpdir / "all"), + ".", "--verbose", ] run_cli_cmd(cmd) diff --git a/pixi.toml b/pixi.toml index 9b13c7a..d6f43bf 100644 --- a/pixi.toml +++ b/pixi.toml @@ -52,4 +52,4 @@ coverage-report = { cmd = "coverage report", cwd = "autotest"} # release update-version = { cmd = "python scripts/update_version.py -v"} -create-codejson = { cmd = "make-code-json" } \ No newline at end of file +create-codejson = { cmd = "make-code-json" }