Skip to content

add enabled field on projects to disable without losing config (#23) #214

add enabled field on projects to disable without losing config (#23)

add enabled field on projects to disable without losing config (#23) #214

Workflow file for this run

name: tests
on:
push:
branches: ['**']
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
parse-check:
name: Parse-check (.ps1 / .psm1)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Parse all PowerShell files
shell: pwsh
run: .\test-claudearium.ps1 -ParseCheck
pure-tests:
name: Pure Pester tests (no WSL2)
runs-on: windows-latest
needs: parse-check
steps:
- uses: actions/checkout@v4
- name: Install Pester 5
shell: pwsh
# Try the publisher-check path first; only fall back to
# -SkipPublisherCheck if the install fails on a publisher / signature
# mismatch (Windows ships Pester 3.4 signed by Microsoft, vs PSGallery's
# "Pester Team" signature). Any other Install-Module failure
# (network, NuGet, PSGallery downtime) is rethrown so it surfaces
# clearly instead of being masked by a weaker retry.
run: |
try {
Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery `
-Scope CurrentUser -Force -AllowClobber -ErrorAction Stop
} catch {
if ($_.Exception.Message -notmatch '(?i)publisher|signed') { throw }
Write-Host " Publisher mismatch (Pester 3.4 vs 5); retrying with -SkipPublisherCheck."
Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery `
-Scope CurrentUser -Force -AllowClobber -SkipPublisherCheck -ErrorAction Stop
}
Import-Module Pester -MinimumVersion 5.0.0 -Force
Get-Module Pester | Format-Table Name, Version, Path
- name: Run pure tests
shell: pwsh
run: .\test-claudearium.ps1 -Auto -Only pure -CI -ResultsJson "${env:GITHUB_WORKSPACE}\tests\results\ci-pure.json"
- name: Upload pure results
if: always()
uses: actions/upload-artifact@v4
with:
name: pure-test-results
path: tests/results/**
distro-tests:
name: Distro Pester tests (WSL2)
runs-on: windows-latest
needs: parse-check
# Allow this lane to fail while we iterate on hosted-runner WSL2 quirks —
# we still want the run for visibility, but it must not block PRs until
# the lane has been observed to be reliable across a few PRs.
continue-on-error: true
# Hard cap so a hung systemd / wsl interop bug can't burn 6h of runner time.
timeout-minutes: 20
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
- name: Cache rootfs
uses: actions/cache@v4
with:
path: tests/.cache
key: rootfs-debian12-${{ runner.os }}-${{ hashFiles('scripts/bootstrap-distro.sh') }}
restore-keys: |
rootfs-debian12-${{ runner.os }}-
- name: Install Pester 5
shell: pwsh
# Same publisher-mismatch fallback as pure-tests — only retry with
# -SkipPublisherCheck on a publisher / signature error; rethrow
# anything else.
run: |
try {
Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery `
-Scope CurrentUser -Force -AllowClobber -ErrorAction Stop
} catch {
if ($_.Exception.Message -notmatch '(?i)publisher|signed') { throw }
Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery `
-Scope CurrentUser -Force -AllowClobber -SkipPublisherCheck -ErrorAction Stop
}
- name: Update WSL kernel
shell: pwsh
run: |
wsl --update --no-launch
wsl --set-default-version 2
wsl --status
- name: Run distro tests
shell: pwsh
run: .\test-claudearium.ps1 -Auto -Only distro -CI -ResultsJson "${env:GITHUB_WORKSPACE}\tests\results\ci-distro.json"
- name: Upload distro results
if: always()
uses: actions/upload-artifact@v4
with:
name: distro-test-results
path: |
tests/results/**