Skip to content

Merge pull request #176 from leojonathanoh/fix/tests-ensure-interacti… #473

Merge pull request #176 from leojonathanoh/fix/tests-ensure-interacti…

Merge pull request #176 from leojonathanoh/fix/tests-ensure-interacti… #473

Workflow file for this run

name: ci-master-pr
on:
push:
branches:
- master
tags:
- '**'
pull_request:
branches:
- master
jobs:
test-powershell-5-1-windows-2019:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- 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-2022:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Powershell version
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
powershell -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
##########
# Docker #
##########
test-powershell-6-0:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:6.0.2-ubuntu-16.04
steps:
- uses: actions/checkout@v3
- 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
- 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
- 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
- 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
- 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.2-ubuntu-20.04
steps:
- uses: actions/checkout@v3
- 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
- name: Powershell version
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command '$PSVersionTable'
- name: Test
run: |
pwsh -NoLogo -NonInteractive -NoProfile -Command './test/test.ps1'
update-draft-release:
needs: [test-powershell-5-1-windows-2019, test-powershell-5-1-windows-2022, test-powershell-6-0, test-powershell-6-1, test-powershell-6-2, test-powershell-7-0, test-powershell-7-1, test-powershell-7-2, test-powershell-7-3]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-draft-release:
needs: [test-powershell-5-1-windows-2019, test-powershell-5-1-windows-2022, test-powershell-6-0, test-powershell-6-1, test-powershell-6-2, test-powershell-7-0, test-powershell-7-1, test-powershell-7-2, test-powershell-7-3]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- id: release-drafter
uses: release-drafter/release-drafter@v5
with:
# config-name: release-drafter.yaml
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}