Workflow-Test [Default] - [🚀 [Feature]: Modules can expose caller-selected secrets to test jobs via TestSecrets #365] by @MariusStorhaug #1618
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Workflow-Test [Default] | |
| run-name: 'Workflow-Test [Default] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}' | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/**' | |
| - '!.github/workflows/Release.yml' | |
| - '!.github/workflows/Linter.yml' | |
| schedule: | |
| - cron: '0 0 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| statuses: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| WorkflowTestDefault: | |
| uses: ./.github/workflows/workflow.yml | |
| secrets: | |
| APIKey: ${{ secrets.APIKey }} | |
| # The calling workflow chooses which secrets to expose to the test jobs. Names are | |
| # caller-defined and read by the module's Pester tests via $env:<name>. CUSTOM_TEST_ENV_VAR | |
| # is a plain literal that proves arbitrary, caller-defined names flow through end to end. | |
| TestSecrets: | | |
| { | |
| "TEST_APP_ENT_CLIENT_ID": ${{ toJSON(secrets.TEST_APP_ENT_CLIENT_ID) }}, | |
| "TEST_APP_ENT_PRIVATE_KEY": ${{ toJSON(secrets.TEST_APP_ENT_PRIVATE_KEY) }}, | |
| "TEST_APP_ORG_CLIENT_ID": ${{ toJSON(secrets.TEST_APP_ORG_CLIENT_ID) }}, | |
| "TEST_APP_ORG_PRIVATE_KEY": ${{ toJSON(secrets.TEST_APP_ORG_PRIVATE_KEY) }}, | |
| "TEST_USER_ORG_FG_PAT": ${{ toJSON(secrets.TEST_USER_ORG_FG_PAT) }}, | |
| "TEST_USER_USER_FG_PAT": ${{ toJSON(secrets.TEST_USER_USER_FG_PAT) }}, | |
| "TEST_USER_PAT": ${{ toJSON(secrets.TEST_USER_PAT) }}, | |
| "CUSTOM_TEST_ENV_VAR": "caller-provided-value" | |
| } | |
| with: | |
| WorkingDirectory: tests/srcTestRepo | |
| ImportantFilePatterns: | | |
| ^src/ | |
| ^README\.md$ | |
| ^\.github/workflows/(?!Release\.yml$|Linter\.yml$) |