Skip to content

Add GitHub Actions CI workflow for SimpleWiki - #72

Merged
chottokun merged 2 commits into
mainfrom
ci-workflow-17543575806466417484
Oct 13, 2026
Merged

chottokun merged 2 commits into
mainfrom
ci-workflow-17543575806466417484

Conversation

@chottokun

Copy link
Copy Markdown
Owner

Added a robust CI workflow file for SimpleWiki following the instructions and constraints.

  • Targets windows-latest with shell: powershell to match vanilla Windows 11/PowerShell 5.1.
  • Implements an Encoding & BOM Verification step that specifically validates ps1, psm1, and psd1 files for UTF-8 with BOM and bat files for UTF-8 without BOM.
  • Installs and runs PSScriptAnalyzer.
  • Executes Pester unit tests with the built-in Pester 3.4.0 by calling Invoke-Pester -Script .\tests -EnableExit.
  • Executes an end-to-end static HTML export smoke test via Export-MarkdigWiki.ps1 and validates that index.html is generated successfully.

PR created automatically by Jules for task 17543575806466417484 started by @chottokun

This adds `.github/workflows/ci.yml` targeting Windows PowerShell 5.1
to run:
- Encoding & BOM validation
- PSScriptAnalyzer checks
- Pester unit tests using the built-in Pester 3.4.0
- End-to-end static HTML export smoke tests

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chottokun

Copy link
Copy Markdown
Owner Author

@jules CI ワークフローの実行で Pester テストが失敗しました。修正をお願いします。

1. エラー内容

  • ジョブ: test
  • ステップ: Pester Unit Tests
  • エラー:
    RuntimeException: Legacy Should syntax (without dashes) is not supported in Pester 5.
    at Should -Invoke @__params__p, C:\Program Files\WindowsPowerShell\Modules\Pester\5.9.0\Pester.psm1
    Tests Passed: 2, Failed: 273
    

2. 原因

GitHub Actions の windows-latest ランナーには Pester 5.9.0 がプリインストールされており、デフォルトで Pester 5 が優先ロードされてしまいます。
しかし、本プロジェクト(AGENTS.md)では vanilla Windows 11 / Windows PowerShell 5.1 組み込みの Pester 3.4.0(ハイフンなしの Should Be 構文)をターゲットにしています。

3. 期待する修正

.github/workflows/ci.yml の Pester Unit Tests ステップで、Pester 5 ではなく Pester 3.4.0 を明示的にロードしてテストを実行するように変更してください。

例:

      - name: Pester Unit Tests
        run: |
          # Force loading Pester 3.4.0 to match Windows 11 built-in environment
          Remove-Module Pester -ErrorAction SilentlyContinue
          Import-Module Pester -RequiredVersion 3.4.0 -Force -ErrorAction SilentlyContinue
          if (-not (Get-Module Pester | Where-Object { $_.Version.Major -eq 3 })) {
              Install-Module -Name Pester -RequiredVersion 3.4.0 -Force -Scope CurrentUser -SkipPublisherCheck
              Import-Module Pester -RequiredVersion 3.4.0 -Force
          }
          Invoke-Pester -Script .\tests -EnableExit

修正コミットのプッシュをお願いします!

@google-labs-jules

Copy link
Copy Markdown
Contributor

@jules CI ワークフローの実行で Pester テストが失敗しました。修正をお願いします。

1. エラー内容

  • ジョブ: test
  • ステップ: Pester Unit Tests
  • エラー:
    RuntimeException: Legacy Should syntax (without dashes) is not supported in Pester 5.
    at Should -Invoke @__params__p, C:\Program Files\WindowsPowerShell\Modules\Pester\5.9.0\Pester.psm1
    Tests Passed: 2, Failed: 273
    

2. 原因

GitHub Actions の windows-latest ランナーには Pester 5.9.0 がプリインストールされており、デフォルトで Pester 5 が優先ロードされてしまいます。
しかし、本プロジェクト(AGENTS.md)では vanilla Windows 11 / Windows PowerShell 5.1 組み込みの Pester 3.4.0(ハイフンなしの Should Be 構文)をターゲットにしています。

3. 期待する修正

.github/workflows/ci.yml の Pester Unit Tests ステップで、Pester 5 ではなく Pester 3.4.0 を明示的にロードしてテストを実行するように変更してください。

例:

      - name: Pester Unit Tests
        run: |
          # Force loading Pester 3.4.0 to match Windows 11 built-in environment
          Remove-Module Pester -ErrorAction SilentlyContinue
          Import-Module Pester -RequiredVersion 3.4.0 -Force -ErrorAction SilentlyContinue
          if (-not (Get-Module Pester | Where-Object { $_.Version.Major -eq 3 })) {
              Install-Module -Name Pester -RequiredVersion 3.4.0 -Force -Scope CurrentUser -SkipPublisherCheck
              Import-Module Pester -RequiredVersion 3.4.0 -Force
          }
          Invoke-Pester -Script .\tests -EnableExit

修正コミットのプッシュをお願いします!

修正を行いました。ご指摘の通り、Pester 5 が優先ロードされる問題を回避するため、明示的に Pester 3.4.0 をロードするステップを追加しました。これで GitHub Actions ランナー上でも Windows 11 の組み込み環境と同様にテストが実行されるはずです。

This addresses test failures in GitHub Actions caused by Pester 5.9.0 being pre-installed and prioritized on the windows-latest runner. By unloading Pester and explicitly importing version 3.4.0 (the built-in version for Windows 11 / Windows PowerShell 5.1), we ensure that the legacy "Should Be" syntax tests succeed.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@chottokun
chottokun merged commit 5f72a2d into main Oct 13, 2026
1 check passed
@chottokun
chottokun deleted the ci-workflow-17543575806466417484 branch October 13, 2026 01:28
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