Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing workflow issues #7

Merged
merged 3 commits into from
Feb 27, 2024
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
25 changes: 5 additions & 20 deletions .github/workflows/Action-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on: [pull_request]

jobs:
ActionTestSrc:
name: Action-Test - [src]
strategy:
matrix:
path: [src, outputs/module]
name: Action-Test - [${{ matrix.path }}]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -21,22 +24,4 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
Name: PSModule
Path: src

ActionTestOutputs:
name: Action-Test - [outputs]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Initialize environment
uses: PSModule/Initialize-PSModule@main

- name: Action-Test
uses: ./
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Name: PSModule
Path: outputs/module
Path: ${{ matrix.path }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Test PowerShell modules with Pester and PSScriptAnalyzer.
## Tools

- [PSScriptAnalyzer | PS Gallery](https://www.powershellgallery.com/packages/PSScriptAnalyzer/)
- [PowerShell Core | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/test-modulemanifest)
- [Test-ModuleManifest - PowerShell Core | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/test-modulemanifest)
- [PowerShellGet | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/PowerShellGet/test-scriptfileinfo)
- [pester.dev](https://www.pester.dev)
- [Pester | GitHub](https://github.com/Pester/Pester)
2 changes: 1 addition & 1 deletion outputs/module/PSModule/PSModule.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
NestedModules = @()
FunctionsToExport = 'Test-PSModule'
CmdletsToExport = @()
AliasesToExport = '*'
AliasesToExport = @()
ModuleList = @()
FileList = 'PSModule.psd1', 'PSModule.psm1'
PrivateData = @{
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Describe "PSModuleTest.Tests.ps1" {
Describe "PSModule.Tests.ps1" {
It "Should be able to import the module" {
Import-Module -Name 'PSModuleTest'
Get-Module -Name 'PSModuleTest' | Should -Not -BeNullOrEmpty
Write-Verbose (Get-Module -Name 'PSModuleTest' | Out-String) -Verbose
Import-Module -Name 'PSModule'
Get-Module -Name 'PSModule' | Should -Not -BeNullOrEmpty
Write-Verbose (Get-Module -Name 'PSModule' | Out-String) -Verbose
}
It "Should be able to call the function" {
Test-PSModuleTest -Name 'World' | Should -Be "Hello, World!"
Expand Down
Loading