Repository navigation
118 lines (106 loc) · 5.86 KB
/
Copy pathPester.yml
File metadata and controls
118 lines (106 loc) · 5.86 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Pester Tests
on:
push:
branches: ["dev", "main"]
pull_request:
branches: ["dev"]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
windows-latest,
ubuntu-latest,
macos-latest,
macos-26-intel,
]
shell: [pwsh, powershell]
exclude:
- os: ubuntu-latest
shell: powershell
- os: macos-latest
shell: powershell
- os: macos-26-intel
shell: powershell
defaults:
run:
shell: ${{ matrix.shell }}
name: Pester Tests - ${{ matrix.os }} - ${{ matrix.shell }}
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Restore dependencies Diagrammer
run: dotnet restore ./Sources/Diagrammer
if: matrix.shell == 'pwsh'
- name: Restore dependencies DiaConvertImageToPDF
run: dotnet restore ./Sources/DiaConvertImageToPDF
if: matrix.os == 'windows-latest' && matrix.shell == 'powershell'
- name: Build the library for MacOS ARM64
run: dotnet publish ./Sources/Diagrammer -c Release -r osx-arm64
if: matrix.os == 'macos-latest' && matrix.shell == 'pwsh'
- name: Create directory for netcore PWSH
run: New-Item -ItemType Directory -Force -Path ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/mac-osx/osx-arm64
if: matrix.os == 'macos-latest' && matrix.shell == 'pwsh'
- name: Copy the Assemblies for MacOS ARM64
run: Copy-Item -Path ./Sources/Diagrammer/bin/Release/net10.0/osx-arm64/publish/* -Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/mac-osx/osx-arm64 -Recurse
if: matrix.os == 'macos-latest' && matrix.shell == 'pwsh'
- name: Build the library for MacOS Intel
run: dotnet publish ./Sources/Diagrammer -c Release -r osx-x64
if: matrix.os == 'macos-26-intel' && matrix.shell == 'pwsh'
- name: Create directory for netcore PWSH
run: New-Item -ItemType Directory -Force -Path ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/mac-osx/osx-x64
if: matrix.os == 'macos-26-intel' && matrix.shell == 'pwsh'
- name: Copy the Assemblies for MacOS Intel
run: Copy-Item -Path ./Sources/Diagrammer/bin/Release/net10.0/osx-x64/publish/* -Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/mac-osx/osx-x64 -Recurse
if: matrix.os == 'macos-26-intel' && matrix.shell == 'pwsh'
- name: Build the library for Linux
run: dotnet publish ./Sources/Diagrammer -c Release -r linux-x64
if: matrix.os == 'ubuntu-latest' && matrix.shell == 'pwsh'
- name: Create directory for netcore PWSH
run: New-Item -ItemType Directory -Force -Path ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/linux-x64
if: matrix.os == 'ubuntu-latest' && matrix.shell == 'pwsh'
- name: Copy the Assemblies for Linux
run: Copy-Item -Path ./Sources/Diagrammer/bin/Release/net10.0/linux-x64/publish/* -Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/linux-x64 -Recurse
if: matrix.os == 'ubuntu-latest' && matrix.shell == 'pwsh'
- name: Build the library for Windows Pwsh
run: dotnet publish ./Sources/Diagrammer -c Release -r win-x64
if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh'
- name: Create directory for netcore PWSH
run: New-Item -ItemType Directory -Force -Path ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/windows-x64
if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh'
- name: Copy the Assemblies for Windows Pwsh
run:
Copy-Item -Path ./Sources/Diagrammer/bin/Release/net10.0/win-x64/publish/* -Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/Core/windows-x64
-Recurse
if: matrix.os == 'windows-latest' && matrix.shell == 'pwsh'
- name: Build the library for Windows PowerShell
run: dotnet publish ./Sources/DiaConvertImageToPDF -c Release
if: matrix.os == 'windows-latest' && matrix.shell == 'powershell'
- name: Create directory for net48 PowerShell
run: New-Item -ItemType Directory -Force -Path ./AsBuiltReport.Diagram/Src/Bin/Assemblies/net48
if: matrix.os == 'windows-latest' && matrix.shell == 'powershell'
- name: Copy the library for Windows PowerShell
run: Copy-Item -Path ./Sources/DiaConvertImageToPDF/bin/Release/net48/publish/* -Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/net48 -Recurse
if: matrix.os == 'windows-latest' && matrix.shell == 'powershell'
- name: Install Graphviz
uses: tlylt/install-graphviz@v1
if: runner.os != 'Windows'
- name: Run Pester Tests
run: |
$CodeCoverageParam = @{}
$OutputFormatParam = @{ OutputFormat = 'NUnitXml' }
.\Tests\Invoke-Tests.ps1 @CodeCoverageParam @OutputFormatParam
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}-${{ matrix.shell }}
path: Tests/testResults.xml
retention-days: 30