Skip to content

build: adopt PowerShellOrg reusable CI workflow - #497

Open
HeyItsGilbert wants to merge 2 commits into
build/lowercase-tests-dirfrom
build/reusable-ci-workflow
Open

HeyItsGilbert wants to merge 2 commits into
build/lowercase-tests-dirfrom
build/reusable-ci-workflow

Conversation

@HeyItsGilbert

@HeyItsGilbert HeyItsGilbert commented Sep 18, 2026

Copy link
Copy Markdown
Member

Stacked on #496 (and #495).

Adds .github/workflows/ci.yml calling PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main, which runs ./build.ps1 -Task Test -Bootstrap across Windows PowerShell 5.1, Windows PowerShell 7, Linux PowerShell 7, and macOS PowerShell 7, plus changelog/spell/PSScriptAnalyzer lint checks.

Also adds two more org-standard reusable workflows (mirrored from PSDepend):

  • .github/workflows/publish.yml -- calls powershell-release.yml@main on push to main (plus manual dispatch overrides) to tag, release, and publish to PSGallery.
  • .github/workflows/stale.yml -- daily actions/stale@v9 sweep for inactive issues/PRs.

Depends on the tests/ lowercase rename in #496 so the reusable workflow's ./tests/out/testResults.xml artifact path resolves on the case-sensitive Linux runner.

CI status on this PR: Linux/macOS/Windows (PS7) legs pass. Windows PowerShell 5.1 and the changelog-lint step fail on pre-existing issues this workflow is the first to catch (legacy CI never ran PS5.1 or linted CHANGELOG.md) -- tracked separately as #498 and #499.

Refs #488 -- do not close automatically; #488''s "CI is green on all 4 environments" criterion isn''t met until #498 and #499 land.

Stack: #495 -> #496 -> 3/3

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The caller workflow is missing an explicit permissions: block, which can cause the reusable workflow to fail under read-only default GITHUB_TOKEN permissions.

Pull request overview

Adopts the PowerShellOrg organization-wide reusable GitHub Actions workflow for PSKoans CI by introducing a new .github/workflows/ci.yml that delegates all CI execution to PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main.

Changes:

  • Add a new GitHub Actions workflow (.github/workflows/ci.yml) to run CI on pushes/tags, PRs, and manual dispatch.
  • Delegate CI execution to the PowerShellOrg reusable workflow (powershell-ci.yml@main).
File summaries
File Description
.github/workflows/ci.yml Adds a new CI workflow that calls the PowerShellOrg reusable CI workflow.
Review details

Suppressed comments (1)

.github/workflows/ci.yml:16

  • Reusable workflows cannot elevate GITHUB_TOKEN permissions; if the repo/org default token permissions are read-only, this call will fail to upload artifacts and publish PR suggestions/test results. Other repos consuming PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main declare explicit workflow-level permissions (e.g., checks/pull-requests write). Add an explicit permissions: block in this caller workflow.
    uses: PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown

Test Results

    4 files    104 suites   1m 38s ⏱️
1 544 tests 1 507 ✅ 24 💤 13 ❌
2 964 runs  2 919 ✅ 32 💤 13 ❌

For more details on these failures, see this check.

Results for commit 5aa5f22.

♻️ This comment has been updated with latest results.

Add .github/workflows/ci.yml calling
PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main, which
runs ./build.ps1 -Task Test -Bootstrap across Windows PowerShell 5.1,
Windows PowerShell 7, Linux PowerShell 7, and macOS PowerShell 7, plus
changelog/spell/PSScriptAnalyzer lint checks.

pull_request trigger has no branch filter (rather than main-only) so
CI runs on every PR in this stack, including intermediate PRs whose
base is a feature branch rather than main.

Depends on the earlier lowercase tests/ rename in this stack so the
reusable workflow's ./tests/out/testResults.xml artifact path resolves
on the case-sensitive Linux runner.

CI on this PR: Linux/macOS/Windows(PS7) pass. Windows PowerShell 5.1
and the changelog-lint step fail on pre-existing issues this workflow
is the first to catch -- tracked as #498 and #499.

Refs #488 (do not auto-close; blocked on #498 and #499 for full green
CI across all 4 required environments)
@HeyItsGilbert
HeyItsGilbert force-pushed the build/reusable-ci-workflow branch from 1ea60f7 to a448fed Compare September 18, 2026 00:22
Mirrors PSDepend's org-standard workflow set:

- publish.yml: calls
  PowerShellOrg/.github/.github/workflows/powershell-release.yml@main
  on push to main (and manual dispatch with version/force/dry_run/
  create_release/publish overrides) to tag, release, and publish to
  PSGallery.
- stale.yml: daily actions/stale@v9 sweep for inactive issues/PRs,
  same thresholds and labels as PSDepend.
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.

2 participants