-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (53 loc) · 2.22 KB
/
Pester_all_os.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "CI"
on:
pull_request:
branches:
- master
env:
GH_PROJECTNAME: PSLiteDB
jobs:
job-1_Pwsh7:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Step-1 Clone Repository
uses: actions/checkout@v2.4.0
- name: Step-2 Run Pester Tests via pwsh
run: |
Import-Module (join-path $env:GITHUB_WORKSPACE -childpath ('module/{0}.psd1' -f $env:GH_PROJECTNAME))
Invoke-Pester -path (join-path $env:GITHUB_WORKSPACE -childpath 'tests/v5.tests.ps1') -pass -Outputfile pester_test_result.xml -OutputFormat NUnitXml
shell: pwsh
- name: Step-3 Create Pester Reports
id: Create_Report
uses: zyborg/pester-tests-report@v1.5.0
with:
test_results_path: pester_test_result.xml
report_name: ${{ runner.os }}
report_title: Pester Results on ${{ runner.os }}
github_token: ${{ secrets.GITHUB_TOKEN }}
gist_token: ${{ secrets.GIST_TOKEN }}
gist_name: ${{ runner.os }}
job-2_WinPowershell_51:
runs-on: windows-latest
steps:
- name: Step-1 Clone Repository
uses: actions/checkout@v2.4.0
- name: Step-2 Run Pester tests (Windows PowerShell 5.1)
run: |
Write-host $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor
Import-Module (join-path $env:GITHUB_WORKSPACE -childpath ('module/{0}.psd1' -f $env:GH_PROJECTNAME))
Invoke-Pester -path (join-path $env:GITHUB_WORKSPACE -childpath 'tests/v5.tests.ps1') -pass -Outputfile pester_test_result.xml -OutputFormat NUnitXml
if ($Error[0].Fullyqualifiederrorid -eq 'PesterAssertionFailed') {exit 1}
shell: powershell
- name: Step-3 Create Pester Reports
id: Create_Report
uses: zyborg/pester-tests-report@v1.5.0
with:
test_results_path: pester_test_result.xml
report_name: ${{ runner.os }} PS5.1
report_title: Pester Results on ${{ runner.os }} using Windows PowerShell 5.1
github_token: ${{ secrets.GITHUB_TOKEN }}
gist_token: ${{ secrets.GIST_TOKEN }}
gist_name: ${{ runner.os }} PS5.1