Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test
  • Loading branch information
MariusStorhaug committed Aug 19, 2024
commit 0a6237e4ceb6b96eb27a8c336c71c9ef5061ebee
26 changes: 12 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ inputs:
description: The path to the tests to run.
required: false
default: tests
Shell:
description: The shell to use for running the tests.
required: false
default: pwsh

outputs:
passed:
Expand All @@ -34,23 +30,25 @@ runs:
steps:
- name: Run Test-PSModule
uses: PSModule/GitHub-Script@v1

- name: Run Test-PSModule
shell: pwsh
id: test
env:
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }}
GITHUB_ACTION_INPUT_TestType: ${{ inputs.TestType }}
GITHUB_ACTION_INPUT_TestsPath: ${{ inputs.TestsPath }}
with:
Script: |
# Test-PSModule
$passed = . "${{ github.action_path }}\scripts\main.ps1" -Verbose
"passed=$passed" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
run: |
# Test-PSModule
$passed = . "${{ github.action_path }}\scripts\main.ps1" -Verbose
"passed=$passed" | Out-File -FilePath $env:GITHUB_OUTPUT -Append

Write-Host "Passed: [$passed]"

Write-Host "Passed: [$passed]"

if (-not $passed) {
exit 1
}
if (-not $passed) {
exit 1
}

- name: Upload test results
uses: actions/upload-artifact@v4
Expand Down