generated from PSModule/Template-Action
-
Notifications
You must be signed in to change notification settings - Fork 0
🩹[Patch]: Workflow improvements #55
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
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
92ccb30
Configure Dependabot for daily schedule with 7-day cooldown
MariusStorhaug 7cb78f6
🩹 [Patch]: Update action versions in action.yml for stability and com…
MariusStorhaug 15aec0a
Add core scripts for Pester execution and initialization
MariusStorhaug ac24d2f
fix: Add persist-credentials: false to checkout actions
MariusStorhaug a63b02b
Disable JSCPD linter and remove configuration file
MariusStorhaug e04ff6b
Rename Auto-Release to Release-GHRepository
MariusStorhaug 34cc6e9
Fix version comment to use patch level
MariusStorhaug 9261729
⬆️ Update GitHub-Script to v1.7.10
MariusStorhaug 5f5ce55
fix: Update actions/upload-artifact to v6.0.0
MariusStorhaug 4425df9
refactor: Simplify status reporting in Action-Test workflow
MariusStorhaug fbd56a0
fix: Align output table formatting in README.md
MariusStorhaug eaf8812
fix: Simplify prescript execution in action.yml
MariusStorhaug ca03809
feat: Add support for prescript execution in Action-Test workflow
MariusStorhaug 778dc2c
fix: Resolve prescript path before execution in prescript.ps1
MariusStorhaug 8446f83
fix: Update prescript path in Action-Test workflow and add missing pr…
MariusStorhaug db8a863
Fix code coverage path in 2-Standard test configuration
MariusStorhaug ead4e65
Add unique TestSuiteName to PrescriptFile test to avoid artifact name…
MariusStorhaug e546ed8
refactor: Simplify test job object structure and enhance outcome comp…
MariusStorhaug 6f4ec70
fix: Correct indentation in comments across multiple script files for…
MariusStorhaug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Release | ||
|
|
||
| run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" | ||
|
|
||
| on: | ||
| pull_request: | ||
MariusStorhaug marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| branches: | ||
| - main | ||
| types: | ||
| - closed | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| - labeled | ||
| paths: | ||
| - 'action.yml' | ||
| - 'src/**' | ||
MariusStorhaug marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: write # Required to create releases | ||
| pull-requests: write # Required to create comments on the PRs | ||
|
|
||
| jobs: | ||
| Release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Release | ||
| uses: PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1 | ||
Large diffs are not rendered by default.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <# | ||
| .DESCRIPTION | ||
| Executes a prescript that can be either an inline script or a path to a script file. | ||
| Safely handles both cases by checking if the input is a valid file path first. | ||
| #> | ||
|
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| $prescript = $env:PSMODULE_INVOKE_PESTER_INPUT_Prescript | ||
|
|
||
| # Exit early if prescript is null or empty | ||
| if ([string]::IsNullOrWhiteSpace($prescript)) { | ||
| Write-Verbose 'No prescript provided, skipping execution.' | ||
| return | ||
| } | ||
|
|
||
| Write-Host '::group::Prescript - Execution' | ||
|
|
||
| # Check if the prescript is a path to an existing file | ||
| if (Test-Path -Path $prescript -PathType Leaf) { | ||
| $scriptPath = Resolve-Path -Path $prescript | ||
| Write-Host "Executing prescript from file: [$scriptPath]" | ||
| & $scriptPath | ||
| } else { | ||
| Write-Host 'Executing inline prescript' | ||
| # Use ScriptBlock::Create for safer execution than Invoke-Expression | ||
| $scriptBlock = [scriptblock]::Create($prescript) | ||
| & $scriptBlock | ||
| } | ||
|
|
||
| Write-Host '::endgroup::' |
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| } | ||
| CodeCoverage = @{ | ||
| Enabled = $true | ||
| Path = "$PSScriptRoot/Emoji.psm1" | ||
| } | ||
| Output = @{ | ||
| CIFormat = 'Auto' | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <# | ||
| .DESCRIPTION | ||
| Sample prescript file used for testing the file-based prescript execution. | ||
| #> | ||
|
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| Write-Host 'This prescript was loaded from a file!' | ||
| Write-Host "Current working directory: $PWD" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <# | ||
| .DESCRIPTION | ||
| Displays the outcome and conclusion of an action step. | ||
| Used by workflow tests to verify action execution results. | ||
| #> | ||
|
|
||
| [CmdletBinding()] | ||
| param() | ||
|
|
||
| Write-Host "Outcome: $env:OUTCOME" | ||
| Write-Host "Conclusion: $env:CONCLUSION" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.