Skip to content

Commit 77e893e

Browse files
Upgrade Process-PSModule consumer workflow (#46)
## Summary - replace the consumer Process-PSModule workflow with the v8 template - add required repository triggers, concurrency, permissions, and secrets - wire the scaffold Pester test through native Pester v6 setup ## Validation - `Invoke-Pester -Path tests -Output Detailed` (Pester 6.0.1) --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 4f525ab commit 77e893e

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/Process-PSModule.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: '0 0 * * *'
7+
push:
8+
branches:
9+
- main
710
pull_request:
811
branches:
912
- main
@@ -13,20 +16,22 @@ on:
1316
- reopened
1417
- synchronize
1518
- labeled
19+
- unlabeled
1620

1721
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
19-
cancel-in-progress: true
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2024

21-
permissions:
22-
contents: write
23-
pull-requests: write
24-
statuses: write
25-
pages: write
26-
id-token: write
25+
permissions: {}
2726

2827
jobs:
2928
Process-PSModule:
30-
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@fb1bdb8fefd243292f779d2a856a38db6fe6daf4 # v6.1.13
29+
permissions:
30+
contents: read
31+
pages: write
32+
id-token: write
33+
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v8
3134
secrets:
32-
APIKey: ${{ secrets.APIKEY }}
35+
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
36+
GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}
37+
GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }}

tests/PSModuleTest.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ param()
1313

1414
Describe 'Module' {
1515
It 'Function: Get-PSModuleTest' {
16-
Get-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
16+
Get-PSModuleTest -Name 'World' | Should-Be 'Hello, World!'
1717
}
1818
}

0 commit comments

Comments
 (0)