diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml index d4035d267..f2498807c 100644 --- a/.github/workflows/node-4+.yml +++ b/.github/workflows/node-4+.yml @@ -83,7 +83,7 @@ jobs: skip-ls-check: true - run: npm run pretest - run: npm run tests-only - - run: npm run coveralls + - uses: codecov/codecov-action@v1 node: name: 'node 4+' diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 79bd1ce46..e7302faea 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -43,6 +43,7 @@ jobs: after_install: npm run copy-metafiles && ./tests/dep-time-travel.sh && cd ${{ matrix.package }} && npm install skip-ls-check: true - run: cd ${{ matrix.package }} && npm run tests-only + - uses: codecov/codecov-action@v1 packages: name: 'packages: all tests' diff --git a/.nycrc b/.nycrc index 8147f3871..20bcfca22 100644 --- a/.nycrc +++ b/.nycrc @@ -1,7 +1,7 @@ { "all": true, "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], + "reporter": ["text-summary", "lcov", "text", "html", "json"], "require": [ "babel-register" ], diff --git a/.travis.yml b/.travis.yml index 583a41197..c289a39e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,4 +36,4 @@ script: - npm run tests-only after_success: - - npm run coveralls + - bash <(curl -s https://codecov.io/bash) diff --git a/appveyor.yml b/appveyor.yml index de79234eb..c728414d4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,28 +5,31 @@ configuration: # Test against this version of Node.js environment: matrix: + - nodejs_version: "16" - nodejs_version: "14" - nodejs_version: "12" - nodejs_version: "10" - nodejs_version: "8" - # - nodejs_version: "6" - # - nodejs_version: "4" + # - nodejs_version: "6" + # - nodejs_version: "4" image: Visual Studio 2019 matrix: fast_finish: false exclude: - - configuration: WSL - nodejs_version: "10" - configuration: WSL nodejs_version: "8" + - configuration: WSL + nodejs_version: "6" + - configuration: WSL + nodejs_version: "4" - # allow_failures: - # - nodejs_version: "4" # for eslint 5 + allow_failures: + - nodejs_version: "4" # for eslint 5 -# platform: -# - x86 -# - x64 +platform: + - x86 + - x64 # Initialization scripts. (runs before repo cloning) init: @@ -35,14 +38,26 @@ init: if ($env:nodejs_version -eq "4") { $env:NPM_VERSION="3" } - if ($env:nodejs_version -in @("8", "10", "12")) { - $env:NPM_VERSION="6.14.5" + if ($env:nodejs_version -in @("8")) { + $env:NPM_VERSION="6" + } + if ($env:nodejs_version -in @("10", "12", "14", "16")) { + $env:NPM_VERSION="6" # TODO: use npm 7 + $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 # Add `ci`-command to `PATH` for running commands either using cmd or wsl depending on the configuration - ps: $env:PATH += ";$(Join-Path $(pwd) "scripts")" @@ -54,6 +69,8 @@ before_build: # Install dependencies - ci npm install + - ci npm run copy-metafiles + - bash ./tests/dep-time-travel.sh 2>&1 # fix symlinks - git config core.symlinks true @@ -99,9 +116,6 @@ test_script: $env:RESOLVERS = [string]::Join(";", $resolvers); - FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm test & popd ) -on_success: - - ci npm run coveralls - # Configuration-specific steps for: - matrix: @@ -127,6 +141,9 @@ for: } $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 ) + # TODO: enable codecov for native windows builds + # on_success: + # - codecov - matrix: only: - configuration: WSL @@ -136,5 +153,7 @@ for: - 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 bash <(curl -s https://codecov.io/bash) build: on diff --git a/package.json b/package.json index dd7cbcb35..7537df99a 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,13 @@ "watch": "npm run tests-only -- -- --watch", "pretest": "linklocal", "posttest": "eslint .", - "mocha": "cross-env BABEL_ENV=test nyc -s mocha", + "mocha": "cross-env BABEL_ENV=test nyc mocha", "tests-only": "npm run mocha tests/src", "test": "npm run tests-only", "test-compiled": "npm run prepublish && BABEL_ENV=testCompiled mocha --compilers js:babel-register tests/src", "test-all": "node --require babel-register ./scripts/testAll", "prepublishOnly": "safe-publish-latest && npm run build", - "prepublish": "not-in-publish || npm run prepublishOnly", - "coveralls": "nyc report --reporter lcovonly && coveralls < ./coverage/lcov.info" + "prepublish": "not-in-publish || npm run prepublishOnly" }, "repository": { "type": "git", @@ -69,7 +68,6 @@ "babel-register": "^6.26.0", "babylon": "^6.18.0", "chai": "^4.3.4", - "coveralls": "^3.1.1", "cross-env": "^4.0.0", "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0", "eslint-import-resolver-node": "file:./resolvers/node", diff --git a/resolvers/node/package.json b/resolvers/node/package.json index 5e7e9dea7..51a7d49cc 100644 --- a/resolvers/node/package.json +++ b/resolvers/node/package.json @@ -9,8 +9,7 @@ "scripts": { "prepublishOnly": "cp ../../{LICENSE,.npmrc} ./", "tests-only": "nyc mocha", - "test": "npm run tests-only", - "coveralls": "nyc report --reporter lcovonly && cd ../.. && coveralls < ./resolvers/node/coverage/lcov.info" + "test": "npm run tests-only" }, "repository": { "type": "git", @@ -35,7 +34,6 @@ }, "devDependencies": { "chai": "^3.5.0", - "coveralls": "^3.1.0", "mocha": "^3.5.3", "nyc": "^11.9.0" } diff --git a/resolvers/webpack/package.json b/resolvers/webpack/package.json index fd805af8b..bd6269e2f 100644 --- a/resolvers/webpack/package.json +++ b/resolvers/webpack/package.json @@ -6,9 +6,7 @@ "scripts": { "prepublishOnly": "cp ../../{LICENSE,.npmrc} ./", "tests-only": "nyc mocha -t 5s", - "test": "npm run tests-only", - "report": "nyc report --reporter=html", - "coveralls": "nyc report --reporter lcovonly && cd ../.. && coveralls < ./resolvers/webpack/coverage/lcov.info" + "test": "npm run tests-only" }, "files": [ "index.js", @@ -53,7 +51,6 @@ "babel-preset-es2015-argon": "latest", "babel-register": "^6.26.0", "chai": "^3.5.0", - "coveralls": "^3.1.0", "mocha": "^3.5.3", "nyc": "^11.9.0", "webpack": "https://gist.github.com/ljharb/9cdb687f3806f8e6cb8a365d0b7840eb" diff --git a/tests/dep-time-travel.sh b/tests/dep-time-travel.sh index d6f5aedfc..2e2459576 100755 --- a/tests/dep-time-travel.sh +++ b/tests/dep-time-travel.sh @@ -2,7 +2,7 @@ # expected: ESLINT_VERSION numeric env var -echo "installing ${ESLINT_VERSION}..." +echo "installing ${ESLINT_VERSION} in node ${TRAVIS_NODE_VERSION} with TS parser ${TS_PARSER:-default}..." export NPM_CONFIG_LEGACY_PEER_DEPS=true