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
18 changes: 11 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ on:
workflow_call:
secrets:
APIKey:
description: The API key to use when publishing modules
description: The API key for the PowerShell Gallery.
required: true
TEST_APP_CLIENT_ID:
description: The client ID for the test application
description: The client ID of an app for running tests.
required: false
TEST_APP_PRIVATE_KEY:
description: The private key for the test application
description: The private key of an app for running tests.
required: false
TEST_FG_PAT:
description: The personal access token for the test application
TEST_FG_ORG_PAT:
description: The fine-grained personal access token with org access for running tests.
required: false
TEST_FG_USER_PAT:
description: The fine-grained personal access token with user account access for running tests.
required: false
TEST_PAT:
description: The personal access token for the test application
description: The classic personal access token for running tests.
required: false
inputs:
Name:
Expand Down Expand Up @@ -77,7 +80,8 @@ env:
GITHUB_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication
TEST_APP_CLIENT_ID: ${{ secrets.TEST_APP_CLIENT_ID }}
TEST_APP_PRIVATE_KEY: ${{ secrets.TEST_APP_PRIVATE_KEY }}
TEST_FG_PAT: ${{ secrets.TEST_FG_PAT }}
TEST_FG_ORG_PAT: ${{ secrets.TEST_FG_ORG_PAT }}
TEST_FG_USER_PAT: ${{ secrets.TEST_FG_USER_PAT }}
TEST_PAT: ${{ secrets.TEST_PAT }}

permissions:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ on:
workflow_call:
secrets:
APIKey:
description: The API key to use when publishing modules
description: The API key for the PowerShell Gallery.
required: true
TEST_APP_CLIENT_ID:
description: The client ID for the test application
description: The client ID of an app for running tests.
required: false
TEST_APP_PRIVATE_KEY:
description: The private key for the test application
description: The private key of an app for running tests.
required: false
TEST_FG_PAT:
description: The personal access token for the test application
TEST_FG_ORG_PAT:
description: The fine-grained personal access token with org access for running tests.
required: false
TEST_FG_USER_PAT:
description: The fine-grained personal access token with user account access for running tests.
required: false
TEST_PAT:
description: The personal access token for the test application
description: The classic personal access token for running tests.
required: false
inputs:
Name:
Expand Down Expand Up @@ -82,7 +85,8 @@ env:
GITHUB_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication
TEST_APP_CLIENT_ID: ${{ secrets.TEST_APP_CLIENT_ID }}
TEST_APP_PRIVATE_KEY: ${{ secrets.TEST_APP_PRIVATE_KEY }}
TEST_FG_PAT: ${{ secrets.TEST_FG_PAT }}
TEST_FG_ORG_PAT: ${{ secrets.TEST_FG_ORG_PAT }}
TEST_FG_USER_PAT: ${{ secrets.TEST_FG_USER_PAT }}
TEST_PAT: ${{ secrets.TEST_PAT }}

permissions:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ in the workflow file.
| ---- | -------- | ----------- | ------- |
| `GITHUB_TOKEN` | `github` context | The token used to authenticate with GitHub. | `${{ secrets.GITHUB_TOKEN }}` |
| `APIKey` | GitHub secrets | The API key for the PowerShell Gallery. | N/A |
| `TEST_APP_CLIENT_ID` | GitHub secrets | The client ID for running tests. | N/A |
| `TEST_APP_PRIVATE_KEY` | GitHub secrets | The private key for running tests. | N/A |
| `TEST_FG_PAT` | GitHub secrets | The fine-grained personal access token for running tests. | N/A |
| `TEST_APP_CLIENT_ID` | GitHub secrets | The client ID of an app for running tests. | N/A |
| `TEST_APP_PRIVATE_KEY` | GitHub secrets | The private key of an app for running tests. | N/A |
| `TEST_FG_ORG_PAT` | GitHub secrets | The fine-grained personal access token with org access for running tests. | N/A |
| `TEST_FG_USER_PAT` | GitHub secrets | The fine-grained personal access token with user account access for running tests. | N/A |
| `TEST_PAT` | GitHub secrets | The classic personal access token for running tests. | N/A |

## Permissions
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/PSModuleTest.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Param(
Write-Verbose "Path to the module: [$Path]" -Verbose

Describe 'Environment Variables are available' {
It 'Should be available [<_>]' -ForEach @('TEST_APP_CLIENT_ID', 'TEST_APP_PRIVATE_KEY', 'TEST_FG_PAT', 'TEST_PAT') {
It 'Should be available [<_>]' -ForEach @('TEST_APP_CLIENT_ID', 'TEST_APP_PRIVATE_KEY', 'TEST_FG_ORG_PAT', 'TEST_FG_USER_PAT', 'TEST_PAT') {
$name = $_
Write-Verbose "Environment variable: [$name]" -Verbose
Get-ChildItem env: | Where-Object { $_.Name -eq $name } | Should -Not -BeNullOrEmpty
Expand Down