Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .appveyor.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# CI for the Pester v4 maintenance branch. Replaces the dead AppVeyor setup.
#
# v4 is in security-fix-only maintenance. We test only Windows PowerShell 5.1
# and PowerShell 7 — nothing else is guaranteed. The goal is to keep the branch
# releasable: green CI here means a security fix can be validated and shipped
# through the manual release process (release.ps1).
name: CI

on:
push:
branches: ['rel/4.x.x']
pull_request:
branches: ['rel/4.x.x']
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- { name: 'PS5.1 - Windows', id: ps51-windows, os: windows-latest, psexe: powershell }
- { name: 'PS7 - Windows', id: ps7-windows, os: windows-latest, psexe: pwsh }
- { name: 'PS7 - Ubuntu', id: ps7-ubuntu, os: ubuntu-latest, psexe: pwsh }
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1

# Same test invocation AppVeyor used: import the module from the repo
# root and run the suite, excluding the tags that need extra tooling.
# `shell:` cannot take a matrix expression, so run from a fixed pwsh and
# launch the leg's interpreter: pwsh for PS7, powershell (Windows
# PowerShell 5.1) for the 5.1 leg. exit $LASTEXITCODE so a failure in
# the launched process still fails the job.
- name: Test Pester
shell: pwsh
run: |
& ${{ matrix.psexe }} -NoProfile -Command '$PSVersionTable; Set-StrictMode -Version Latest; $global:PesterDebugPreference_ShowFullErrors = $true; Import-Module ./Pester.psd1; Invoke-Pester -ExcludeTag VersionChecks, StyleRules, Help -EnableExit -OutputFile TestResults.xml -OutputFormat NUnitXml'
exit $LASTEXITCODE

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: results-${{ matrix.id }}
retention-days: 7
if-no-files-found: ignore
path: TestResults.xml
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion Functions/TestDrive.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Set-StrictMode -Version Latest

if ($PSVersionTable.PSVersion.Major -lt 6 -or $IsWindows) {
$tempPath = $env:TEMP
# don't use $env:TEMP directly, GitHub Actions runners set it to the 8.3
# short form (C:\Users\RUNNER~1\...) but TestDrive is created via
# GetTempPath which returns the long form, so the -like comparisons below
# would never match
$tempPath = [System.IO.Path]::GetTempPath()
}
elseif ($IsMacOS) {
$tempPath = '/private/tmp'
Expand Down
4 changes: 2 additions & 2 deletions Functions/TestResults.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ InModuleScope Pester {
#create state
$TestResults = New-PesterState -Path TestDrive:\
$testResults.EnterTestGroup('Describe #1', 'Describe')
$TestResults.AddTestResult("Successful testcase", 'Passed', (New-TimeSpan -mi 1))
$TestResults.AddTestResult("Successful testcase", 'Passed', (New-TimeSpan -Minutes 1))
$testResults.LeaveTestGroup('Describe #1', 'Describe')
$testResults.EnterTestGroup('Describe #2', 'Describe')
$TestResults.AddTestResult("Failed testcase", 'Failed', (New-TimeSpan -Seconds 2))
Expand Down Expand Up @@ -352,7 +352,7 @@ InModuleScope Pester {
#create state
$TestResults = New-PesterState -Path TestDrive:\
$testResults.EnterTestGroup('Describe #1', 'Describe')
$TestResults.AddTestResult("Successful testcase", 'Passed', (New-TimeSpan -mi 1))
$TestResults.AddTestResult("Successful testcase", 'Passed', (New-TimeSpan -Minutes 1))
$testResults.LeaveTestGroup('Describe #1', 'Describe')
$testResults.EnterTestGroup('Describe #2', 'Describe')
$TestResults.AddTestResult("Failed testcase", 'Failed', (New-TimeSpan -Seconds 2))
Expand Down
46 changes: 0 additions & 46 deletions azure-pipelines.yml

This file was deleted.

Loading