Skip to content

Commit 2409871

Browse files
authored
Update buildandpublish.yml
1 parent 6957e2b commit 2409871

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

.github/workflows/buildandpublish.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,28 @@ jobs:
2222
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2323
- uses: actions/checkout@v2
2424

25-
# Runs a single command using the runners shell
26-
- name: Run a one-line script
27-
run: echo Hello, world!
25+
- name: Install dependencies
26+
shell: pwsh
27+
run: |
28+
Install-PackageProvider -Name NuGet -Force | Out-Null
29+
Install-Module -Name Pester -Force
30+
Install-Module -Name posh-git -Force
31+
Install-Module -Name platyPS -Force
2832
29-
# Runs a set of commands using the runners shell
30-
- name: Run a multi-line script
33+
- name: Install dependencies
34+
shell: pwsh
3135
run: |
32-
echo Add other actions to build,
33-
echo test, and deploy your project.
36+
Import-Module Pester -force
37+
Invoke-Pester @Verbose -Path "$ProjectRoot\Tests" -OutputFormat NUnitXml -OutputFile "$ProjectRoot\$TestFile" -PassThru |
38+
Export-Clixml -Path "$ProjectRoot\PesterResults_PS$PSVersion`_$Timestamp.xml"
3439
35-
- name: Display the path
36-
run: echo ${env:PATH}
37-
shell: pwsh
40+
- name: NUnit Reporter
41+
uses: MirrorNG/nunit-reporter@v1.0.5
42+
with:
43+
# github token
44+
access-token: ${{ secrets.GITHUB_TOKEN }}
45+
# glob to junit xml files
46+
path: PesterResults*.xml
47+
# max number of failed tests to include
48+
numFailures: 30
49+
# - ps: . .\build.ps1

0 commit comments

Comments
 (0)