Skip to content

Commit

Permalink
[Tests] fix coverage script for windows; tweak appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
manuth authored and ljharb committed May 31, 2020
1 parent 1760b89 commit 6dd28ea
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions appveyor.yml
Expand Up @@ -39,13 +39,18 @@ for:
# install modules
- ps: >-
if ($env:nodejs_version -eq "4") {
npm install -g npm@3;
cmd /c npm install -g npm@3;
}
if ($env:nodejs_version -in @("8", "10", "12")) {
npm install -g npm@6.10.3;
cmd /c npm install -g npm@6.14.5;
}
- npm install

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

# Upgrade nyc
- npm i --no-save nyc@15.0.1
- ps: >-
$resolverDir = "./resolvers";
Get-ChildItem -Directory $resolverDir |
ForEach-Object {
Push-Location $(Resolve-Path $(Join-Path $resolverDir $_));
cmd /c npm ls nyc 2`>`&1;
if ($?) {
cmd /c npm i --no-save nyc@15.0.1 2`>`&1;
}
Pop-Location;
}
# Post-install test scripts.
test_script:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -31,7 +31,7 @@
"test-compiled": "npm run prepublish && BABEL_ENV=testCompiled mocha --compilers js:babel-register tests/src",
"test-all": "node --require babel-register ./scripts/testAll",
"prepublish": "not-in-publish || npm run build",
"coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls"
"coveralls": "nyc report --reporter lcovonly && coveralls < ./coverage/lcov.info"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 6dd28ea

Please sign in to comment.