-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (34 loc) · 1.04 KB
/
Tests.yml
File metadata and controls
41 lines (34 loc) · 1.04 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
name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
Tests:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 📦 Install required modules from PSGallery
run: |
Install-PSResource -Repository PSGallery -Name ModuleTools -TrustRepository
Install-PSResource -Repository PSGallery -Name Microsoft.PowerShell.PlatyPS -TrustRepository
- name: 🏗️ Build Module
run: Invoke-MTBuild -Verbose
- name: 🧪 Run Pester Tests
run: Invoke-MTTest
- name: 📝 Generate Report
continue-on-error: true
run: |
# Get list of files in the dist directory directory
$Report = New-MDHeader -Text "Output Files 📁" -Level 2
$Report += Get-ChildItem -Path ./dist -Recurse | Select-Object Name, Directory | New-MDTable
echo "$Report" >> $env:GITHUB_STEP_SUMMARY
echo "$Report"