Skip to content

Commit

Permalink
Test (ci): Add execution of tests on Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltimothyoh committed Apr 26, 2024
1 parent 11fb024 commit c73e3b1
Showing 1 changed file with 200 additions and 0 deletions.
200 changes: 200 additions & 0 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
name: ci-master-pr

on:
push:
branches:
- master
tags:
- '**'
pull_request:
branches:
- master

jobs:
test-powershell-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-5-1-windows-2019:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
##########
# Docker #
##########
# Get powershell tags: https://mcr.microsoft.com/v2/powershell/tags/list
test-powershell-6-0:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:6.0.4-ubuntu-16.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-6-1:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:6.1.3-ubuntu-18.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-6-2:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:6.2.4-ubuntu-18.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-7-0:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:7.0.3-ubuntu-18.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-7-1:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:7.1.5-ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-7-2:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:7.2-ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-7-3:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:7.3-ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
test-powershell-7-4:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:7.4-ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6'
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'

0 comments on commit c73e3b1

Please sign in to comment.