Workflow-Test [Default] - [🚀 [Feature]: Modules can expose caller-selected secrets to test jobs via TestSecrets #365] by @MariusStorhaug #1623
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 }} | |
| # Self-test only: THROWAWAY, non-sensitive placeholder values (not real secrets), so the | |
| # framework's own tests never depend on repository secrets and masking can be verified with | |
| # known values. A real caller would use `toJSON(secrets.<name>)` for each entry instead. | |
| # The folded '>-' block with flat indentation produces a SINGLE-LINE secret value; a literal | |
| # '|' multi-line value makes GitHub register every line as its own mask and over-masks logs. | |
| TestSecrets: >- | |
| { | |
| "TEST_APP_ENT_CLIENT_ID": "tmp-ent-client-id-01", | |
| "TEST_APP_ENT_PRIVATE_KEY": "tmp-ent-key-a1\ntmp-ent-key-a2", | |
| "TEST_APP_ORG_CLIENT_ID": "tmp-org-client-id-02", | |
| "TEST_APP_ORG_PRIVATE_KEY": "tmp-org-key-b1\ntmp-org-key-b2", | |
| "TEST_USER_ORG_FG_PAT": "tmp-user-org-fgpat-03", | |
| "TEST_USER_USER_FG_PAT": "tmp-user-usr-fgpat-04", | |
| "TEST_USER_PAT": "tmp-user-pat-05", | |
| "CUSTOM_TEST_ENV_VAR": "caller-provided-value" | |
| } | |
| with: | |
| WorkingDirectory: tests/srcTestRepo | |
| ImportantFilePatterns: | | |
| ^src/ | |
| ^README\.md$ | |
| ^\.github/workflows/(?!Release\.yml$|Linter\.yml$) |