forked from aaronparker/LatestUpdate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
64 lines (55 loc) · 2.37 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
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
61
62
63
64
# 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.1.{build}
# 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
# PowerShell Gallery API key for publishing an update to the module
# The "secure:" value is the Appveyor encryption of the key
environment:
GitHubKey:
secure: unWb9ORoL3oo22K6z2U2fZ+AdBmv75laNb7jibBwQCMGv9u8Cs2GayQBGjkqfPro
NuGetApiKey:
secure: /YPozcX4yV1XCrZuS8DAhOmH/OOjkg6+zrCTT3lHR3a7/SY7S83JNNgYBsROlLq3
# 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
- book.json
- docs/*
- help/*
- img/*
- scripts/*
- TestsResults.xml
message: /update version.*|update appveyor.*/
only_commits:
files:
- LatestUpdate/
- tests/
# Install Pester to enable tests
install:
- ps: . .\tests\Install.ps1
# 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: $res = Invoke-Pester -Path ".\tests" -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."}
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubKey):[email protected]`n"
- git config --global user.email "[email protected]"
- git config --global user.name "Aaron Parker"
- git config --global core.autocrlf true
- git config --global core.safecrlf false
- ps: . .\tests\Build.ps1
branches:
except:
- docs
- Win8-Win7