Create a GitHub Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: pwsh
jobs:
test_Pester_Action:
runs-on: ubuntu-latest
name: Run Pester
steps:
- name: checkout
uses: actions/checkout@v2
- name: Run pester tests
id: pesterTests
uses: PowerShell/GitHub-Actions/PesterActionV1@master
with:
script: './tests'
- name: Upload pester results
uses: actions/upload-artifact@v2
with:
name: pester-results
path: ${{ steps.pesterTests.outputs.logPath }}
- What version of Pester to use. This defaults to the latest tested with the action.
Example:
- name: Upload pester results
uses: actions/upload-artifact@v2
with:
name: pester-results
path: ${{ steps.pesterTests.outputs.logPath }
version: 4.9
- What format of the xml log file to use.
This defaults to
NUnitXml
. The other option isJUnitXml
.
Example:
- name: Upload pester results
uses: actions/upload-artifact@v2
with:
name: pester-results
path: ${{ steps.pesterTests.outputs.logPath }
logFormat: JUnitXml
- What tags to run. This defaults to all tags.
Example which runs only myTag
and myTag2
:
- name: Upload pester results
uses: actions/upload-artifact@v2
with:
name: pester-results
path: ${{ steps.pesterTests.outputs.logPath }
tags: myTag,myTag2