configuration:
- Native
- WSL
environment:
matrix:
- nodejs_version: "16"
- nodejs_version: "14"
- nodejs_version: "12"
- nodejs_version: "10"
- nodejs_version: "8"
image: Visual Studio 2019
matrix:
fast_finish: false
exclude:
- configuration: WSL
nodejs_version: "8"
- configuration: WSL
nodejs_version: "6"
- configuration: WSL
nodejs_version: "4"
allow_failures:
- nodejs_version: "4"
platform:
- x86
- x64
init:
- ps: >-
if ($env:nodejs_version -eq "4") {
$env:NPM_VERSION="3"
}
if ($env:nodejs_version -in @("8")) {
$env:NPM_VERSION="6"
}
if ($env:nodejs_version -in @("10", "12", "14", "16")) {
$env:NPM_VERSION="6"
$env:NPM_CONFIG_LEGACY_PEER_DEPS="true"
}
- ps: >-
$env:ESLINT_VERSION="7";
if ([int]$env:nodejs_version -le 8) {
$env:ESLINT_VERSION="6"
}
if ([int]$env:nodejs_version -le 7) {
$env:ESLINT_VERSION="5"
}
if ([int]$env:nodejs_version -le 6) {
$env:ESLINT_VERSION="4"
}
- ps: $env:WINDOWS_NYC_VERSION = "15.0.1"
- ps: $env:TRAVIS_NODE_VERSION = $env:nodejs_version
- ps: $env:PATH += ";$(Join-Path $(pwd) "scripts")"
before_build:
- IF DEFINED NPM_VERSION ci sudo npm install -g npm@%NPM_VERSION%
- ci npm install
- ci npm run copy-metafiles
- bash ./tests/dep-time-travel.sh 2>&1
- git config core.symlinks true
- git reset --hard
- ci git reset --hard
- ps: >-
$resolverDir = "./resolvers";
$resolvers = @();
Get-ChildItem -Directory $resolverDir |
ForEach {
$resolvers += "$(Resolve-Path $(Join-Path $resolverDir $_))";
}
$env:RESOLVERS = [string]::Join(";", $resolvers);
- FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm install & popd )
- IF DEFINED ESLINT_VERSION ci npm install --no-save eslint@%ESLINT_VERSION%
build_script:
- ps: "# This Project isn't actually built"
test_script:
- ci node --version
- ci npm --version
- ci npm run pretest
- ci npm run tests-only
- ps: >-
$resolverDir = "./resolvers";
$resolvers = @();
Get-ChildItem -Directory $resolverDir |
ForEach {
$resolvers += "$(Resolve-Path $(Join-Path $resolverDir $_))";
}
$env:RESOLVERS = [string]::Join(";", $resolvers);
- FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm test & popd )
for:
- matrix:
except:
- configuration: WSL
install:
- ps: Install-Product node $env:nodejs_version
before_test:
- ci npm i --no-save nyc@%WINDOWS_NYC_VERSION%
- ps: >-
$resolverDir = "./resolvers";
$resolvers = @();
Get-ChildItem -Directory $resolverDir |
ForEach {
Push-Location $(Resolve-Path $(Join-Path $resolverDir $_));
ci npm ls nyc > $null;
if ($?) {
$resolvers += "$(pwd)";
}
Pop-Location;
}
$env:RESOLVERS = [string]::Join(";", $resolvers);
- IF DEFINED RESOLVERS FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm install --no-save nyc@%WINDOWS_NYC_VERSION% & popd )
- matrix:
only:
- configuration: WSL
install:
- ps: $env:WSLENV += ":nodejs_version"
- ps: wsl curl -sL 'https://deb.nodesource.com/setup_${nodejs_version}.x' `| sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 -E bash -
- wsl sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
on_success:
- ci curl -Os https://uploader.codecov.io/latest/linux/codecov
- ci chmod +x codecov
- ci ./codecov
build: on