Merge pull request #427 from HeyItsGilbert/BuildIcon #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PesterReports | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v2 | |
# Setup Build Helpers | |
- name: SetupBuildHelpers | |
shell: pwsh | |
run: | | |
Install-Module BuildHelpers -Scope CurrentUser -Force | Out-Null | |
Install-Module PowerShellBuild -Scope CurrentUser -Force | Out-Null | |
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force | Out-Null | |
Install-Module platyPS -Scope CurrentUser -Force | Out-Null | |
- name: Test | |
shell: pwsh | |
run: | | |
./build.ps1 -Task Test | |
- name: Upload Unit Test Results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Unit Test Results (OS ${{ matrix.os }}) | |
path: ./tests/Out/testResults.xml | |
publish-test-results: | |
name: "Publish Unit Tests Results" | |
needs: test | |
runs-on: ubuntu-latest | |
# the test job might be skipped, we don't need to run this job then | |
if: success() || failure() | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: artifacts | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
with: | |
files: artifacts/**/*.xml |