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 4939230
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 21 deletions.
92 changes: 71 additions & 21 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ jobs:
test-powershell-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand All @@ -27,9 +25,7 @@ jobs:
test-powershell-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand All @@ -40,9 +36,7 @@ jobs:
test-powershell-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand All @@ -53,9 +47,7 @@ jobs:
test-powershell-5-1-windows-2019:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand All @@ -67,14 +59,76 @@ 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@v1
- 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@v1
- 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@v1
- 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@v1
- 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:
image: theohbrothers/docker-powershell:7.2-ubuntu-22.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand All @@ -90,9 +144,7 @@ jobs:
container:
image: theohbrothers/docker-powershell:7.3-ubuntu-22.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand All @@ -108,9 +160,7 @@ jobs:
container:
image: theohbrothers/docker-powershell:7.4-ubuntu-22.04-git
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v1
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
Expand Down
1 change: 1 addition & 0 deletions test/PSRepositoryReleaseManager.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $functionTestScriptBlock = {
}

# Globals
"$(Get-Location)" | Write-Host
$env:RELEASE_TAG_REF = git describe --tags --abbrev=0

# Script: ci/Invoke-Generate.ps1
Expand Down

0 comments on commit 4939230

Please sign in to comment.