-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (30 loc) · 1.05 KB
/
unit-test-only.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Run Unit Tests
on:
push:
permissions:
contents: write
jobs:
unit-test:
name: Unit Test
runs-on: ubuntu-latest
if: github.repository_owner != 'ShaunLawrie' || (github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prerelease')
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Unit Test
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
Write-Host "Working on ${{ github.ref }}"
Install-Module EZOut -Scope CurrentUser -RequiredVersion 2.0.6 -Force
& .\PwshSpectreConsole\Build.ps1
$env:PSModulePath = @($env:PSModulePath, ".\PwshSpectreConsole\") -join ":"
$PSVersionTable | Out-Host
Get-Module Pester -ListAvailable | Out-Host
Invoke-Pester -CI -ExcludeTag "ExcludeCI"
- name: Upload Snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: Snapshots
path: PwshSpectreConsole.Tests/@snapshots/*.txt