Skip to content

ci(help): analyze a folder of fixtures with Test-IntuneScript on Linux - #48

Merged
fadwen merged 1 commit into
mainfrom
ci/linux-analysis
Oct 19, 2026
Merged

fadwen merged 1 commit into
mainfrom
ci/linux-analysis

Conversation

@fadwen

@fadwen fadwen commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

Test-IntuneScript is described as needing only the file, with no tenant and no elevation, which makes it the one part of the module a Linux host can use. Nothing tested that: the help job, the only Linux job in quality-gates.yml, imported the module and checked help. A run on a Debian 13 host with PowerShell 7.4.4 showed the command works there, with the script type inferred from forward-slash folder paths and a folder search returning every script, so the job now checks it on every pull request.

Changes

  • .github/workflows/quality-gates.yml, help job: a step writes two fixtures under a temporary folder, Remediations/Widget/Detect.ps1 with a return before exit 1 and Win32/Widget/Detect.ps1 with exit 0 and nothing on stdout, runs Test-IntuneScript over the folder, and fails unless the IslExitCodeIssue error, the IslOutputIssue error and an IslAssumedContext note naming Win32Detection are all reported. The fixtures mirror the one Build/Publish-Module.ps1 analyzes in the staged module, plus the Win32 case that exercises folder-based inference.
  • CLAUDE.md: the help job's description says what now runs on Linux and what still does not.
  • CHANGELOG.md: Changed entry under Unreleased.

Verification

  • The step's checks rehearsed on the Proxmox host (Debian 13, PowerShell 7.4.4) against the 0.34.0 staged module: both errors reported, the Win32 folder set the script type, folder run returned findings for both scripts.
  • The job itself runs on this pull request.

Notes

  • Workflow and documentation only; no module code changes.

The static analysis needs only the file, which makes it the one part of
the module a Linux host can use, and nothing tested that: the help job
imported the module and checked help. It now writes a remediation
detection with return before exit 1 and a Win32 detection with nothing
on stdout under the folder layout the suite template describes, runs
Test-IntuneScript over the folder, and fails unless both errors are
reported with the script type taken from the folder names.

@fadwen fadwen left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes on the lines whose reason the diff does not show.

# file and nothing else. This step keeps that true. The script type is inferred from
# folder names, so the fixtures use the layouts the suite template describes, with the
# separators this host writes; the harness and the log readers stay Windows-only.
- name: Analyze scripts on Linux

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placed in the help job rather than a job of its own because it is the same Ubuntu runner with the module already importable, and a separate job would add a runner for a 10-second check. Two fixtures rather than one so the folder-based inference is exercised: the Publish-Module rehearsal already covers the remediation case on Windows, and the Win32 folder is the path where a separator difference would show. Asserting on the IslAssumedContext message is what proves the type came from the folder and not from a default.

@fadwen
fadwen merged commit a5cefc8 into main Oct 19, 2026
4 checks passed
@fadwen
fadwen deleted the ci/linux-analysis branch October 19, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant