forked from serialport/node-serialport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
85 lines (71 loc) · 2.22 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
os: unstable
environment:
prebuild_upload:
secure: a/seaM+nUnQWhWUnbyz8fl9vPwuyqDTrFviptDykYp2c46vdTvlAxU6yqD/PpDiI
COVERALLS_REPO_TOKEN:
secure: iDcAJCYgJK4tffyzEHbMVR8DatJcIN8eY0h29p9JQkl43TcEcm6Z6JLOBpGDk1MJ
matrix:
- nodejs_version: "4"
- nodejs_version: "6"
- binary_builder: "true"
nodejs_version: "8"
platform:
- x86
- x64
# Dropping support for node 4 on 32 windows because it has isuses with ssl certs and npm
matrix:
exclude:
- platform: x86
nodejs_version: "4"
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform;
# upgrade npm if on node 4 as npm2 doesn't like our dev peer deps
- ps: >
if ($env:nodejs_version -eq "4") {
npm install -g npm | Write-Host;
}
npm config set progress false
npm config set spin false
- ps: >
@{
"nodejs_version" = $env:nodejs_version
"platform" = $env:platform
"node binary version" = $(node -v)
"node platform@arch" = $(node -p 'process.platform + process.arch')
"npm version" = $(npm -v)
"APPVEYOR_REPO_COMMIT_MESSAGE" = $env:APPVEYOR_REPO_COMMIT_MESSAGE
"git latest tag" = "$(git describe --tags --always HEAD)"
"appveyor_repo_tag" = $env:appveyor_repo_tag
} | Out-String | Write-Host;
# Check if we're building the latest tag, if so
# then we publish the binaries if tests pass.
- ps: >
if ($env:appveyor_repo_tag -match "true" -and ("$(git describe --tags --always HEAD)" -eq $env:appveyor_repo_tag_name)) {
$env:publish_binary = $env:binary_builder;
}
if ($env:publish_binary -eq "true") {
"We're publishing a binary!" | Write-Host
} else {
"We're not publishing a binary" | Write-Host
}
true;
# We don't currently have a port to test on windows
# - ps: $env:TEST_PORT = "COM1";
build_script:
- npm install --build-from-source
test_script:
- ps: >
if ($env:nodejs_version -ne "4") {
npm run lint
}
node ./
# If we run npm test in powershell it'll have the wrong encoding so we have to do it like this
- npm test
- ps: >
if ($env:publish_binary -eq "true") {
npm run prebuild-upload
}
true;
after_test:
- pip install codecov && codecov --file coverage\coverage.json
deploy: OFF