Skip to content

🩹 [Patch]: Add separate Prerelease test workflow #32

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

Merged
merged 3 commits into from
Jan 26, 2025
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
26 changes: 26 additions & 0 deletions .github/workflows/Action-Test-Prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Action-Test-Prerelease

run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read

jobs:
ActionTest:
uses: ./.github/workflows/TestWorkflow.yml
secrets: inherit
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
with:
runs-on: ${{ matrix.os }}
Prerelease: true
38 changes: 29 additions & 9 deletions .github/workflows/TestWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@ on:
workflow_call:
inputs:
runs-on:
description: 'The operating system to run the tests on'
description: The operating system to run the tests on
required: true
type: string
Prerelease:
description: Run the prerelease version of the action
required: false
type: boolean
default: false
secrets:
TEST_USER_PAT:
description: 'Personal Access Token for the test user'
description: Personal Access Token for the test user
required: true
TEST_USER_USER_FG_PAT:
description: 'Personal Access Token for the test user with full gists scope'
description: Personal Access Token for the test user with full gists scope
required: true
TEST_USER_ORG_FG_PAT:
description: 'Personal Access Token for the test user with full gists scope'
description: Personal Access Token for the test user with full gists scope
required: true
TEST_APP_ENT_CLIENT_ID:
description: 'Client ID for the test GitHub App for the enterprise'
description: Client ID for the test GitHub App for the enterprise
required: true
TEST_APP_ENT_PRIVATE_KEY:
description: 'Private Key for the test GitHub App for the enterprise'
description: Private Key for the test GitHub App for the enterprise
required: true
TEST_APP_ORG_CLIENT_ID:
description: 'Client ID for the test GitHub App for the organization'
description: Client ID for the test GitHub App for the organization
required: true
TEST_APP_ORG_PRIVATE_KEY:
description: 'Private Key for the test GitHub App for the organization'
description: Private Key for the test GitHub App for the organization
required: true

permissions:
Expand All @@ -44,12 +49,14 @@ jobs:
- name: Action-Test
uses: ./
with:
Prerelease: ${{ inputs.Prerelease }}
Debug: true
Verbose: true

- name: Action-Test [ShowInit]
uses: ./
with:
Prerelease: ${{ inputs.Prerelease }}
Debug: true
Verbose: true
ShowInit: true
Expand All @@ -76,42 +83,49 @@ jobs:
uses: ./
with:
Script: tests/info.ps1
Prerelease: ${{ inputs.Prerelease }}

- name: Action-Test [.\tests\info.ps1]
if: success() || failure()
uses: ./
with:
Script: .\tests\info.ps1
Prerelease: ${{ inputs.Prerelease }}

- name: Action-Test [./tests/info.ps1]
if: success() || failure()
uses: ./
with:
Script: ./tests/info.ps1
Prerelease: ${{ inputs.Prerelease }}

- name: Action-Test [. .\tests\info.ps1]
if: success() || failure()
uses: ./
with:
Script: . .\tests\info.ps1
Prerelease: ${{ inputs.Prerelease }}

- name: Action-Test [. ./tests/info.ps1]
if: success() || failure()
uses: ./
with:
Script: . ./tests/info.ps1
Prerelease: ${{ inputs.Prerelease }}

- name: Action-Test [. '.\tests\info.ps1']
if: success() || failure()
uses: ./
with:
Script: . '.\tests\info.ps1'
Prerelease: ${{ inputs.Prerelease }}

- name: Action-Test [. './tests/info.ps1']
if: success() || failure()
uses: ./
with:
Script: . './tests/info.ps1'
Prerelease: ${{ inputs.Prerelease }}

ActionTestCommands:
name: Commands + Outputs
Expand All @@ -127,7 +141,7 @@ jobs:
with:
Debug: true
Verbose: true
Prerelease: true
Prerelease: ${{ inputs.Prerelease }}
ShowInit: true
ShowOutput: true
Script: |
Expand Down Expand Up @@ -182,6 +196,7 @@ jobs:
uses: ./
with:
Token: ''
Prerelease: ${{ inputs.Prerelease }}
Script: |
LogGroup 'My group' {
'This is a group'
Expand All @@ -199,6 +214,7 @@ jobs:
uses: ./
with:
Token: ${{ secrets.TEST_USER_PAT }}
Prerelease: ${{ inputs.Prerelease }}
Script: |
LogGroup 'Get-GitHubUser' {
Get-GitHubUser | Format-Table -AutoSize
Expand All @@ -216,6 +232,7 @@ jobs:
uses: ./
with:
Token: ${{ secrets.TEST_USER_USER_FG_PAT }}
Prerelease: ${{ inputs.Prerelease }}
Script: |
LogGroup 'Get-GitHubUser' {
Get-GitHubUser | Format-Table -AutoSize
Expand All @@ -233,6 +250,7 @@ jobs:
uses: ./
with:
Token: ${{ secrets.TEST_USER_ORG_FG_PAT }}
Prerelease: ${{ inputs.Prerelease }}
Script: |
LogGroup 'Get-GitHubUser' {
Get-GitHubUser | Format-Table -AutoSize
Expand All @@ -251,6 +269,7 @@ jobs:
with:
ClientID: ${{ secrets.TEST_APP_ENT_CLIENT_ID }}
PrivateKey: ${{ secrets.TEST_APP_ENT_PRIVATE_KEY }}
Prerelease: ${{ inputs.Prerelease }}
Script: |
LogGroup 'Get-GitHubApp' {
Get-GitHubApp | Format-Table -AutoSize
Expand Down Expand Up @@ -281,6 +300,7 @@ jobs:
with:
ClientID: ${{ secrets.TEST_APP_ORG_CLIENT_ID }}
PrivateKey: ${{ secrets.TEST_APP_ORG_PRIVATE_KEY }}
Prerelease: ${{ inputs.Prerelease }}
Script: |
LogGroup 'Get-GitHubApp' {
Get-GitHubApp | Format-Table -AutoSize
Expand Down