Add test pipeline for powershell scripts
This commit is contained in:
parent
02d0e0bcf9
commit
02152c234f
2 changed files with 40 additions and 0 deletions
36
.github/workflows/test.yml
vendored
Normal file
36
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
solution: AmagnoVirtualPrinter.sln
|
||||||
|
configuration: Release
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Perform a Pester test from the command-line
|
||||||
|
shell: pwsh
|
||||||
|
run: Test-Path $Env:GITHUB_WORKSPACE\test.ps1 | Should -Be $true
|
||||||
|
- name: Create msi from PowerShell Script
|
||||||
|
run: |
|
||||||
|
$Env:GITHUB_WORKSPACE\test.ps1
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: installer
|
||||||
|
path: ./test.txt
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: files
|
||||||
|
path: files/**/*
|
||||||
4
test.ps1
Normal file
4
test.ps1
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
Get-Date
|
||||||
|
Start-Sleep -Seconds 10
|
||||||
|
Get-Date
|
||||||
|
New-Item -Name test.txt
|
||||||
Loading…
Add table
Add a link
Reference in a new issue