Skip to content

Commit 6dd28ea

Browse files
neurolagljharb
authored andcommitted
[Tests] fix coverage script for windows; tweak appveyor
1 parent 1760b89 commit 6dd28ea

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

appveyor.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@ for:
3939
# install modules
4040
- ps: >-
4141
if ($env:nodejs_version -eq "4") {
42-
npm install -g npm@3;
42+
cmd /c npm install -g npm@3;
4343
}
4444
if ($env:nodejs_version -in @("8", "10", "12")) {
45-
npm install -g npm@6.10.3;
45+
cmd /c npm install -g npm@6.14.5;
4646
}
4747
- npm install
4848

49+
- ps: >-
50+
if ([int]$env:nodejs_version -le 8) {
51+
cmd /c npm i eslint@6 2`>`&1;
52+
}
53+
4954
# fix symlinks
5055
- git config core.symlinks true
5156
- git reset --hard
@@ -54,6 +59,20 @@ for:
5459
- cd .\resolvers\webpack && npm install && cd ..\..
5560
- cd .\resolvers\node && npm install && cd ..\..
5661

62+
# Upgrade nyc
63+
- npm i --no-save nyc@15.0.1
64+
- ps: >-
65+
$resolverDir = "./resolvers";
66+
Get-ChildItem -Directory $resolverDir |
67+
ForEach-Object {
68+
Push-Location $(Resolve-Path $(Join-Path $resolverDir $_));
69+
cmd /c npm ls nyc 2`>`&1;
70+
if ($?) {
71+
cmd /c npm i --no-save nyc@15.0.1 2`>`&1;
72+
}
73+
Pop-Location;
74+
}
75+
5776
# Post-install test scripts.
5877
test_script:
5978

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"test-compiled": "npm run prepublish && BABEL_ENV=testCompiled mocha --compilers js:babel-register tests/src",
3232
"test-all": "node --require babel-register ./scripts/testAll",
3333
"prepublish": "not-in-publish || npm run build",
34-
"coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls"
34+
"coveralls": "nyc report --reporter lcovonly && coveralls < ./coverage/lcov.info"
3535
},
3636
"repository": {
3737
"type": "git",

0 commit comments

Comments
 (0)