Skip to content

Commit 1eaadaf

Browse files
Merge pull request #507 from EvotecIT/migrate-ci-from-azuredevops-to-github-actions
2 parents 2a2c50c + ba67046 commit 1eaadaf

File tree

4 files changed

+178
-97
lines changed

4 files changed

+178
-97
lines changed

.github/workflows/BuildModule.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
name: Test PowerShell
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths-ignore:
9+
- '*.md'
10+
- 'Docs/**'
11+
- 'Examples/**'
12+
- '.gitignore'
13+
pull_request:
14+
branches:
15+
- master
16+
17+
env:
18+
BUILD_CONFIGURATION: 'Debug'
19+
20+
jobs:
21+
refresh-psd1:
22+
name: 'Refresh PSD1'
23+
runs-on: windows-latest
24+
timeout-minutes: 20
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
31+
32+
- name: Setup PowerShell modules
33+
run: |
34+
Install-Module PSPublishModule -Force -Scope CurrentUser -AllowClobber
35+
Install-Module PSWriteColor -Force -Scope CurrentUser -AllowClobber
36+
Install-Module PSSharedGoods -Force -Scope CurrentUser -AllowClobber
37+
shell: pwsh
38+
39+
- name: Refresh module manifest
40+
env:
41+
RefreshPSD1Only: 'true'
42+
run: |
43+
./Build/Build-Module.ps1
44+
shell: pwsh
45+
46+
- name: Commit refreshed PSD1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
HEAD_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}
50+
run: |
51+
git config user.name "github-actions[bot]"
52+
git config user.email "github-actions[bot]@users.noreply.github.com"
53+
git add PSWriteHTML.psd1
54+
git commit -m "chore: regenerate psd1" || echo "No changes to commit"
55+
git push origin HEAD:$Env:HEAD_BRANCH
56+
shell: pwsh
57+
58+
- name: Upload refreshed manifest
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: psd1
62+
path: PSWriteHTML.psd1
63+
64+
test-windows-ps5:
65+
needs: refresh-psd1
66+
name: 'Windows PowerShell 5.1'
67+
runs-on: windows-latest
68+
timeout-minutes: 20
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v4
72+
73+
- name: Download manifest
74+
uses: actions/download-artifact@v4
75+
with:
76+
name: psd1
77+
path: .
78+
79+
- name: Install PowerShell modules
80+
run: |
81+
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
82+
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
83+
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
84+
shell: powershell
85+
86+
- name: Run PowerShell tests
87+
run: ./PSWriteHTML.Tests.ps1
88+
shell: powershell
89+
90+
test-windows-ps7:
91+
needs: refresh-psd1
92+
name: 'Windows PowerShell 7'
93+
runs-on: windows-latest
94+
timeout-minutes: 20
95+
steps:
96+
- name: Checkout code
97+
uses: actions/checkout@v4
98+
99+
- name: Download manifest
100+
uses: actions/download-artifact@v4
101+
with:
102+
name: psd1
103+
path: .
104+
105+
- name: Install PowerShell modules
106+
run: |
107+
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
108+
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
109+
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
110+
shell: pwsh
111+
112+
- name: Run PowerShell tests
113+
run: ./PSWriteHTML.Tests.ps1
114+
shell: pwsh
115+
116+
test-ubuntu:
117+
needs: refresh-psd1
118+
name: 'Ubuntu PowerShell 7'
119+
runs-on: ubuntu-latest
120+
timeout-minutes: 20
121+
steps:
122+
- name: Checkout code
123+
uses: actions/checkout@v4
124+
125+
- name: Download manifest
126+
uses: actions/download-artifact@v4
127+
with:
128+
name: psd1
129+
path: .
130+
131+
- name: Install PowerShell
132+
run: |
133+
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
134+
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
135+
sudo apt-get update
136+
sudo apt-get install -y powershell
137+
138+
- name: Install PowerShell modules
139+
run: |
140+
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
141+
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
142+
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
143+
shell: pwsh
144+
145+
- name: Run PowerShell tests
146+
run: ./PSWriteHTML.Tests.ps1
147+
shell: pwsh
148+
149+
test-macos:
150+
needs: refresh-psd1
151+
name: 'macOS PowerShell 7'
152+
runs-on: macos-latest
153+
timeout-minutes: 20
154+
steps:
155+
- name: Checkout code
156+
uses: actions/checkout@v4
157+
158+
- name: Download manifest
159+
uses: actions/download-artifact@v4
160+
with:
161+
name: psd1
162+
path: .
163+
164+
- name: Install PowerShell
165+
run: brew install --cask powershell
166+
167+
- name: Install PowerShell modules
168+
run: |
169+
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
170+
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
171+
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
172+
shell: pwsh
173+
174+
- name: Run PowerShell tests
175+
run: ./PSWriteHTML.Tests.ps1
176+
shell: pwsh

PSWriteHTML.AzurePipelines.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

PSWriteHTML.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Description = 'PSWriteHTML is PowerShell Module to generate beautiful HTML reports, pages, emails without any knowledge of HTML, CSS or JavaScript. To get started basics PowerShell knowledge is required.'
99
FunctionsToExport = @('Add-HTML', 'Add-HTMLScript', 'Add-HTMLStyle', 'ConvertTo-CascadingStyleSheets', 'Email', 'EmailAttachment', 'EmailBCC', 'EmailBody', 'EmailCC', 'EmailFrom', 'EmailHeader', 'EmailLayout', 'EmailLayoutColumn', 'EmailLayoutRow', 'EmailListItem', 'EmailOptions', 'EmailReplyTo', 'EmailServer', 'EmailSubject', 'EmailTo', 'Enable-HTMLFeature', 'New-AccordionItem', 'New-CalendarEvent', 'New-CarouselSlide', 'New-ChartAxisX', 'New-ChartAxisY', 'New-ChartBar', 'New-ChartBarOptions', 'New-ChartDataLabel', 'New-ChartDesign', 'New-ChartDonut', 'New-ChartEvent', 'New-ChartGrid', 'New-ChartLegend', 'New-ChartLine', 'New-ChartMarker', 'New-ChartPie', 'New-ChartRadial', 'New-ChartRadialOptions', 'New-ChartSpark', 'New-ChartTheme', 'New-ChartTimeLine', 'New-ChartToolbar', 'New-ChartToolTip', 'New-DiagramEvent', 'New-DiagramLink', 'New-DiagramNode', 'New-DiagramOptionsInteraction', 'New-DiagramOptionsLayout', 'New-DiagramOptionsLinks', 'New-DiagramOptionsManipulation', 'New-DiagramOptionsNodes', 'New-DiagramOptionsPhysics', 'New-GageSector', 'New-HierarchicalTreeNode', 'New-HTML', 'New-HTMLAccordion', 'New-HTMLAnchor', 'New-HTMLCalendar', 'New-HTMLCarousel', 'New-HTMLCarouselStyle', 'New-HTMLChart', 'New-HTMLCodeBlock', 'New-HTMLContainer', 'New-HTMLDate', 'New-HTMLDiagram', 'New-HTMLFontIcon', 'New-HTMLFooter', 'New-HTMLFrame', 'New-HTMLGage', 'New-HTMLHeader', 'New-HTMLHeading', 'New-HTMLHierarchicalTree', 'New-HTMLHorizontalLine', 'New-HTMLImage', 'New-HTMLInfoCard', 'New-HTMLList', 'New-HTMLListItem', 'New-HTMLLogo', 'New-HTMLMain', 'New-HTMLMap', 'New-HTMLMarkdown', 'New-HTMLMermeidChart', 'New-HTMLNav', 'New-HTMLNavFloat', 'New-HTMLNavTop', 'New-HTMLOrgChart', 'New-HTMLPage', 'New-HTMLPanel', 'New-HTMLPanelStyle', 'New-HTMLQRCode', 'New-HTMLSection', 'New-HTMLSectionScrolling', 'New-HTMLSectionScrollingItem', 'New-HTMLSectionStyle', 'New-HTMLSpanStyle', 'New-HTMLStatus', 'New-HTMLStatusItem', 'New-HTMLSummary', 'New-HTMLSummaryItem', 'New-HTMLSummaryItemData', 'New-HTMLTab', 'New-HTMLTable', 'New-HTMLTableOption', 'New-HTMLTableStyle', 'New-HTMLTabPanel', 'New-HTMLTabPanelColor', 'New-HTMLTabStyle', 'New-HTMLTag', 'New-HTMLText', 'New-HTMLTextBox', 'New-HTMLTimeline', 'New-HTMLTimelineItem', 'New-HTMLToast', 'New-HTMLTree', 'New-HTMLTreeChildCounter', 'New-HTMLTreeNode', 'New-HTMLWinBox', 'New-HTMLWizard', 'New-HTMLWizardColor', 'New-HTMLWizardStep', 'New-MapArea', 'New-MapLegendOption', 'New-MapLegendSlice', 'New-MapPlot', 'New-NavFloatWidget', 'New-NavFloatWidgetItem', 'New-NavItem', 'New-NavLink', 'New-NavTopMenu', 'New-OrgChartNode', 'New-TableAlphabetSearch', 'New-TableButtonColumnVisibility', 'New-TableButtonCopy', 'New-TableButtonCSV', 'New-TableButtonExcel', 'New-TableButtonPageLength', 'New-TableButtonPDF', 'New-TableButtonPrint', 'New-TableButtonSearchBuilder', 'New-TableColumnOption', 'New-TableCondition', 'New-TableConditionGroup', 'New-TableContent', 'New-TableEvent', 'New-TableHeader', 'New-TableLanguage', 'New-TablePercentageBar', 'New-TablePercentageBarCondition', 'New-TableReplace', 'New-TableRowGrouping', 'Out-HtmlView', 'Save-HTML')
1010
GUID = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
11-
ModuleVersion = '1.38.0'
11+
ModuleVersion = '1.39.0'
1212
PowerShellVersion = '5.1'
1313
PrivateData = @{
1414
PSData = @{
@@ -20,7 +20,7 @@
2020
RequiredModules = @(@{
2121
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
2222
ModuleName = 'PSSharedGoods'
23-
ModuleVersion = '0.0.309'
23+
ModuleVersion = '0.0.310'
2424
})
2525
RootModule = 'PSWriteHTML.psm1'
2626
}

0 commit comments

Comments
 (0)