From 4b6ef90547b4885bd40875c559fb156a3f94b001 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 5 Sep 2026 09:39:36 -0400 Subject: [PATCH 1/3] ci: upgrade CI to SQL Server 2025 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ansible-test-windows.yml | 4 ++-- .github/workflows/ansible-test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ansible-test-windows.yml b/.github/workflows/ansible-test-windows.yml index 9bd44493..d4acd2f4 100644 --- a/.github/workflows/ansible-test-windows.yml +++ b/.github/workflows/ansible-test-windows.yml @@ -208,7 +208,7 @@ jobs: with: install: sqlengine sa-password: L0wlydb4 - version: 2022 + version: 2025 - name: Retry SQL Server install id: retry1 @@ -217,7 +217,7 @@ jobs: with: install: sqlengine sa-password: L0wlydb4 - version: 2022 + version: 2025 - name: Run integration test # zizmor: ignore[template-injection] -- env.GHWS is a computed path; matrix values are controlled enums run: | diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index a8ce6fe8..4449a6a1 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -138,7 +138,7 @@ jobs: contents: write # Required for uploading coverage reports services: sqlserver: - image: mcr.microsoft.com/mssql/server:2022-latest # zizmor: ignore[unpinned-images] -- Trusted publisher for this CI use case + image: mcr.microsoft.com/mssql/server:2025-latest # zizmor: ignore[unpinned-images] -- Trusted publisher for this CI use case ports: - 1433:1433 env: From f27f3b8572546fece530b5c67ef60f9e38999977 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 5 Sep 2026 09:54:24 -0400 Subject: [PATCH 2/3] ci: use wslpath via wsl bash -c for Linux workspace path Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ansible-test-windows.yml | 25 ++++------------------ 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ansible-test-windows.yml b/.github/workflows/ansible-test-windows.yml index d4acd2f4..896734f4 100644 --- a/.github/workflows/ansible-test-windows.yml +++ b/.github/workflows/ansible-test-windows.yml @@ -132,27 +132,10 @@ jobs: - name: Get Linux workspace path shell: pwsh run: | - # $ws = & wslpath --% -u -a "$env:WORKSPACE"" - # seems wslpath is not available on server 2019 - - function ConvertTo-LinuxPathCrappy { - [CmdletBinding()] - param( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] - $LiteralPath - ) - - End { - $resolved = Resolve-Path -LiteralPath $LiteralPath - $drive = ($resolved | Split-Path -Qualifier).TrimEnd(':').ToLower() - $rooted = ($resolved | Split-Path -NoQualifier).Replace('\', '/').TrimStart('/') - - '/mnt/{0}/{1}' -f $drive, $rooted - } - } - $ws = ConvertTo-LinuxPathCrappy -LiteralPath "$env:WORKSPACE" + # Calling wsl.exe's wslpath directly from pwsh (`wsl wslpath ...`) mangles the + # path (drops separators) due to a known argument-encoding issue between pwsh + # and wsl.exe. Routing through `wsl bash -c` avoids it. + $ws = wsl bash -c "wslpath -u -a '$env:WORKSPACE'" Add-Content -LiteralPath $env:GITHUB_ENV -Value "GHWS=$ws" # Override break-sys-pkg defaults, because we don't need to bother with python venv for CI From e3b1af699292bd2ca4ec757caa9d93920e1cc47a Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 5 Sep 2026 09:56:28 -0400 Subject: [PATCH 3/3] ci: drop the Get Linux workspace path step Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ansible-test-windows.yml | 30 ++++++---------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ansible-test-windows.yml b/.github/workflows/ansible-test-windows.yml index 896734f4..0c18a7fd 100644 --- a/.github/workflows/ansible-test-windows.yml +++ b/.github/workflows/ansible-test-windows.yml @@ -80,7 +80,6 @@ jobs: GROUP: ${{ matrix.group }} # zizmor: ignore[template-injection] -- Matrix value from controlled environment PYTHON: python3 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # zizmor: ignore[secrets-outside-env] -- Codecov token needed for coverage uploads; environment protection would block PR-triggered runs - WORKSPACE: ${{ github.workspace }} steps: - name: Check out code @@ -129,15 +128,6 @@ jobs: done exit 1 - - name: Get Linux workspace path - shell: pwsh - run: | - # Calling wsl.exe's wslpath directly from pwsh (`wsl wslpath ...`) mangles the - # path (drops separators) due to a known argument-encoding issue between pwsh - # and wsl.exe. Routing through `wsl bash -c` avoids it. - $ws = wsl bash -c "wslpath -u -a '$env:WORKSPACE'" - Add-Content -LiteralPath $env:GITHUB_ENV -Value "GHWS=$ws" - # Override break-sys-pkg defaults, because we don't need to bother with python venv for CI # # ansible-core devel requires Python >= 3.13 (see pyproject.toml on the devel branch), @@ -169,14 +159,12 @@ jobs: - name: Install collection dependencies id: collection-dependency - # zizmor: ignore[template-injection] -- GHWS is dynamically computed earlier in the workflow - run: ansible-galaxy collection install ansible.windows -p "${{ env.GHWS }}" + run: ansible-galaxy collection install ansible.windows -p "$PWD" continue-on-error: true - name: Retry install collection dependencies if: steps.collection-dependency.outcome == 'failure' - # zizmor: ignore[template-injection] -- GHWS is dynamically computed earlier in the workflow - run: ansible-galaxy collection install ansible.windows -p "${{ env.GHWS }}" + run: ansible-galaxy collection install ansible.windows -p "$PWD" - name: Set integration test options working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration @@ -202,15 +190,13 @@ jobs: sa-password: L0wlydb4 version: 2025 - - name: Run integration test # zizmor: ignore[template-injection] -- env.GHWS is a computed path; matrix values are controlled enums - run: | - pushd "${{ env.GHWS }}/ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}" - ansible-test windows-integration -v --color --retry-on-error --continue-on-error --diff --coverage --requirements windows/group/${{ matrix.group }}/ + - name: Run integration test # zizmor: ignore[template-injection] -- matrix values are controlled enums + working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} + run: ansible-test windows-integration -v --color --retry-on-error --continue-on-error --diff --coverage --requirements windows/group/${{ matrix.group }}/ - - name: Generate coverage report # zizmor: ignore[template-injection] -- env.GHWS is a computed path - run: | - pushd "${{ env.GHWS }}/ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}" - ansible-test coverage xml -v --requirements + - name: Generate coverage report + working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} + run: ansible-test coverage xml -v --requirements # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0