Skip to content

ci: add static and Windows regression checks - #52

Merged
Fei-Away merged 3 commits into
Fei-Away:mainfrom
wasim-builds:ci-workflow
Jul 17, 2026
Merged

ci: add static and Windows regression checks#52
Fei-Away merged 3 commits into
Fei-Away:mainfrom
wasim-builds:ci-workflow

Conversation

@wasim-builds

@wasim-builds wasim-builds commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Resolves #20.

Adds GitHub Actions coverage for checks that do not require Codex.app:

  • Bash syntax, Node.js syntax, runtime safety, source-encoding, and cross-platform version checks.
  • Portable macOS and Windows Node.js regressions plus payload validation on Ubuntu.
  • The complete Windows regression suite on Windows PowerShell 5.1 and PowerShell 7 with Node.js 22.

The first real Windows run exposed that PowerShell 5.1 parsed non-ASCII UTF-8 source through the local ANSI code page. The three PowerShell files containing Chinese text are now explicitly UTF-8 with BOM, and CI prevents future non-ASCII PowerShell 5.1 sources from losing that marker.

Maintainer update: rebased onto current main, corrected stale repository paths, and retained the original contributor as commit author.

Copilot AI review requested due to automatic review settings July 16, 2026 18:51

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Fei-Away Fei-Away changed the title ci: Add GitHub Actions workflow for static checks ci: add static and Windows regression checks Jul 17, 2026
@Fei-Away

Copy link
Copy Markdown
Owner

Maintainer update applied: rebased this contribution onto current main, fixed the stale ./assets and root VERSION paths, switched validation to Node.js 22, and added the complete Windows test suite on both Windows PowerShell 5.1 and PowerShell 7.

Local validation passed for YAML parsing, shell/Node syntax, runtime safety assertions, version consistency, and git diff --check. The original commit author remains @wasim-builds. Waiting for the new Actions runs before merge.

Fei-Away
Fei-Away previously approved these changes Jul 17, 2026

@Fei-Away Fei-Away left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Maintainer fixes validated locally. Approving pending the Windows and static Actions results.

@Fei-Away
Fei-Away force-pushed the ci-workflow branch 2 times, most recently from b587d46 to 66921b3 Compare July 17, 2026 05:41
@Fei-Away

Copy link
Copy Markdown
Owner

The first Windows PowerShell 5.1 run did its job and exposed a real source-encoding failure: non-ASCII UTF-8 .ps1 files without a BOM were parsed through the runner ANSI code page. I fixed the three affected PowerShell files (theme-windows.ps1, tray-dream-skin.ps1, and run-tests.ps1) and added a static guard so future non-ASCII PS 5.1 source must retain UTF-8 BOM.

The workflow now also runs both portable Node test suites and payload checks. Local Node regressions (8/8), payload validation, PowerShell 7 parsing, YAML parsing, and git diff --check all pass. Re-running both Windows shells independently now.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wasim-builds

Copy link
Copy Markdown
Contributor Author

Pushed a follow-up fix to wasim-builds:ci-workflow for the failing Windows (Windows PowerShell 5.1) check.

Root cause: Invoke-DreamSkinNative piped native output through ForEach-Object before reading $LASTEXITCODE, which can lose the native process exit code in PowerShell 5.1 pipelines.

Fix: capture native output first, snapshot $LASTEXITCODE immediately, then format output lines. This preserves the real native exit code while still handling stderr safely under ErrorActionPreference='Stop'.

@Fei-Away Fei-Away left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

All required checks are green on the current head: portable static/Node regressions, Windows PowerShell 5.1, and PowerShell 7. The contributor follow-up correctly captures $LASTEXITCODE before PowerShell 5.1 stringifies native stderr output. Approved for squash merge.

@Fei-Away

Copy link
Copy Markdown
Owner

Final validation passed on the current head: Static checks ✅, Windows PowerShell 5.1 ✅, PowerShell 7 ✅. Thank you @wasim-builds for following the first Windows failure and contributing the native exit-code correction directly.

@Fei-Away
Fei-Away merged commit c2e9f40 into Fei-Away:main Jul 17, 2026
3 checks passed
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.

[CI] 无任何自动化检查 / No CI for the checks that do not need Codex.app

3 participants