-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (34 loc) · 1.13 KB
/
build-test.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
name: Test Build
on:
workflow_dispatch:
# push:
# branches:
# - master
pull_request:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Run build script
run: |
# Install-PSResource -Name PlatyPS -TrustRepository -Version 0.14.2 -Scope CurrentUser -AcceptLicense
$moduleName="FogApi";
.\invoke-modulebuild.ps1
$builtPath = ".\_module_build\$moduleName"
ls -recurse $builtPath;
if (Test-Modulemanifest -path "$builtPath\$moduleName.psd1") {
import-module "$builtPath\" -ea 0
if ($null -ne (Get-module $modulename -ea 0)) {
"Built module imported successfully!`n$((Get-module $modulename) | out-string)" | out-host
return $true;
} else {
Write-Error "Failed to import module!"
return $false;
}
} else {
Write-Error "Manifest threw error"
return $false;
}