-
Notifications
You must be signed in to change notification settings - Fork 116
60 lines (55 loc) · 1.88 KB
/
PesterReports.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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