-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
32 lines (26 loc) · 1.58 KB
/
appveyor.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
# YAML Reference Guide: https://www.appveyor.com/docs/appveyor-yml/
# Environmental Variables Guide: https://www.appveyor.com/docs/environment-variables/
# YAML Validator: https://ci.appveyor.com/tools/validate-yaml
# Disable automatic builds
# Without this, the following error shows up:
# "Specify a project or solution file. The directory does not contain a project or solution file."
build: off
# Version number
version: 1.0.0.{build}
image: Ubuntu2204
# Ignore testing a commit if only the README.md file changed
# Or if various strings are found in the commit message: updated readme, update readme, update docs, update version, update appveyor
skip_commits:
files:
- README.md
message: /updated readme.*|update readme.*s|update docs.*|update version.*|update appveyor.*/
# There's no need to alter the build number for a Pull Request (PR) since they don't modify anything
pull_requests:
do_not_increment_build_number: true
# Invoke Pester to run all of the unit tests, then save the results into XML in order to populate the AppVeyor tests section
# If any of the tests fail, consider the pipeline failed
test_script:
- ps: Install-Module -Name Pester -Force -SkipPublisherCheck
- ps: $res = Invoke-Pester -Path ".\tests\*.Tests.ps1" -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
- ps: if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}