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
56 changes: 0 additions & 56 deletions .github/workflows/BuildModule.yml

This file was deleted.

176 changes: 176 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
name: Test PowerShell

on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'Docs/**'
- 'Examples/**'
- '.gitignore'
pull_request:
branches:
- master

env:
BUILD_CONFIGURATION: 'Debug'

jobs:
refresh-psd1:
name: 'Refresh PSD1'
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}

- name: Setup PowerShell modules
run: |
Install-Module PSPublishModule -Force -Scope CurrentUser -AllowClobber
Install-Module PSWriteColor -Force -Scope CurrentUser -AllowClobber
Install-Module PSSharedGoods -Force -Scope CurrentUser -AllowClobber
shell: pwsh

- name: Refresh module manifest
env:
RefreshPSD1Only: 'true'
run: |
./Build/Build-Module.ps1
shell: pwsh

- name: Commit refreshed PSD1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add PSWriteHTML.psd1
git commit -m "chore: regenerate psd1" || echo "No changes to commit"
git push origin HEAD:$Env:HEAD_BRANCH
shell: pwsh

- name: Upload refreshed manifest
uses: actions/upload-artifact@v4
with:
name: psd1
path: PSWriteHTML.psd1

test-windows-ps5:
needs: refresh-psd1
name: 'Windows PowerShell 5.1'
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download manifest
uses: actions/download-artifact@v4
with:
name: psd1
path: .

- name: Install PowerShell modules
run: |
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
shell: powershell

- name: Run PowerShell tests
run: ./PSWriteHTML.Tests.ps1
shell: powershell

test-windows-ps7:
needs: refresh-psd1
name: 'Windows PowerShell 7'
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download manifest
uses: actions/download-artifact@v4
with:
name: psd1
path: .

- name: Install PowerShell modules
run: |
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
shell: pwsh

- name: Run PowerShell tests
run: ./PSWriteHTML.Tests.ps1
shell: pwsh

test-ubuntu:
needs: refresh-psd1
name: 'Ubuntu PowerShell 7'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download manifest
uses: actions/download-artifact@v4
with:
name: psd1
path: .

- name: Install PowerShell
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
sudo apt-get update
sudo apt-get install -y powershell

- name: Install PowerShell modules
run: |
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
shell: pwsh

- name: Run PowerShell tests
run: ./PSWriteHTML.Tests.ps1
shell: pwsh

test-macos:
needs: refresh-psd1
name: 'macOS PowerShell 7'
runs-on: macos-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download manifest
uses: actions/download-artifact@v4
with:
name: psd1
path: .

- name: Install PowerShell
run: brew install --cask powershell

- name: Install PowerShell modules
run: |
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSWriteColor -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
shell: pwsh

- name: Run PowerShell tests
run: ./PSWriteHTML.Tests.ps1
shell: pwsh
39 changes: 0 additions & 39 deletions PSWriteHTML.AzurePipelines.yml

This file was deleted.

4 changes: 2 additions & 2 deletions PSWriteHTML.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
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.'
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')
GUID = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
ModuleVersion = '1.38.0'
ModuleVersion = '1.39.0'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
Expand All @@ -20,7 +20,7 @@
RequiredModules = @(@{
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
ModuleName = 'PSSharedGoods'
ModuleVersion = '0.0.309'
ModuleVersion = '0.0.310'
})
RootModule = 'PSWriteHTML.psm1'
}