Skip to content

Commit

Permalink
Test (ci): Add tests on additional PS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltimothyoh committed Apr 28, 2024
1 parent 8e1b5e6 commit 85769c9
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
72 changes: 72 additions & 0 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,78 @@ jobs:
# Docker #
##########
# Get powershell tags: https://mcr.microsoft.com/v2/powershell/tags/list
test-powershell-6-1:
runs-on: ubuntu-latest
container:
image: theohbrothers/docker-powershell:6.1.3-ubuntu-18.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Ignore git permissions
run: |
git config --global --add safe.directory "$( pwd )"
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$VerbosePreference = "Continue"; ./test/test.ps1'
test-powershell-6-2:
runs-on: ubuntu-latest
container:
image: theohbrothers/docker-powershell:6.2.4-ubuntu-18.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Ignore git permissions
run: |
git config --global --add safe.directory "$( pwd )"
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$VerbosePreference = "Continue"; ./test/test.ps1'
test-powershell-7-0:
runs-on: ubuntu-latest
container:
image: theohbrothers/docker-powershell:7.0.3-ubuntu-18.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Ignore git permissions
run: |
git config --global --add safe.directory "$( pwd )"
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$VerbosePreference = "Continue"; ./test/test.ps1'
test-powershell-7-1:
runs-on: ubuntu-latest
container:
image: theohbrothers/docker-powershell:7.1.5-ubuntu-20.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Ignore git permissions
run: |
git config --global --add safe.directory "$( pwd )"
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$VerbosePreference = "Continue"; ./test/test.ps1'
test-powershell-7-2:
runs-on: ubuntu-latest
container:
Expand Down
2 changes: 1 addition & 1 deletion test/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ try {

# Run integration tests
"Running integration tests" | Write-Verbose
$integratedFailedCount = & "$PSScriptRoot\PSRepositoryReleaseManager.Tests.ps1"
$integratedFailedCount = .\PSRepositoryReleaseManager.Tests.ps1
if ($integratedFailedCount -gt 0) {
$testFailed = $true
}
Expand Down

0 comments on commit 85769c9

Please sign in to comment.