diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7047442196..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ -language: node_js -node_js: '8' -sudo: true -os: linux -dist: trusty - -branches: - only: - - master - - /^greenkeeper/.*$/ - -addons: - apt: - packages: - - clang-3.3 - - build-essential - - gnome-keyring - - libsecret-1-dev - - python-gnomekeyring - -env: - global: - - npm_config_clang=1 - - CC=clang - - CXX=clang++ - - ATOM_GITHUB_FS_EVENT_LOG=1 - - MOCHA_TIMEOUT=60000 - - UNTIL_TIMEOUT=30000 - - DISPLAY=":99" - - ATOM_GITHUB_DISABLE_KEYTAR=1 - - ATOM_GITHUB_INLINE_GIT_EXEC=1 - - ATOM_CHANNEL=dev - - ATOM_SCRIPT_PATH=${HOME}/atom/usr/bin/atom-dev - - APM=${HOME}/atom/usr/bin/apm-dev - -notifications: - email: false - -install: -- npm install -g npm -- > - curl -s -L "https://atom.io/download/deb?channel=$ATOM_CHANNEL" - -H 'Accept: application/octet-stream' - -o "atom.deb" -- > - /sbin/start-stop-daemon --start --quiet - --pidfile /tmp/custom_xvfb_99.pid --make-pidfile - --background --exec /usr/bin/Xvfb -- :99 -ac - -screen 0 1280x1024x16 -- dpkg-deb -x atom.deb "$HOME/atom" -- | - echo "Atom version:" - ${ATOM} --version - echo "apm version:" - ${APM} --version -- ${APM} ci || ${APM} install - -before_script: -- eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login) -- eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start) -- dbus-launch /usr/bin/python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');" - -script: -- npm run test:coverage - -after_script: -- npm run coveralls diff --git a/README.md b/README.md index 07b7ea2bea..975b89fbf8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | Build | Code Coverage | Dependencies | |-------|---------------|--------------| -| [![Build Status](https://dev.azure.com/atom-github/GitHub%20package%20for%20Atom/_apis/build/status/atom.github)](https://dev.azure.com/atom-github/GitHub%20package%20for%20Atom/_build/latest?definitionId=1) | [![Coverage Status](https://coveralls.io/repos/github/atom/github/badge.svg?branch=master)](https://coveralls.io/github/atom/github?branch=master) | [![Greenkeeper badge](https://badges.greenkeeper.io/atom/github.svg)](https://greenkeeper.io/) [![Dependency Status](https://david-dm.org/atom/github.svg)](https://david-dm.org/atom/github) | +| [![Build Status](https://dev.azure.com/atom-github/GitHub%20package%20for%20Atom/_apis/build/status/atom.github)](https://dev.azure.com/atom-github/GitHub%20package%20for%20Atom/_build/latest?definitionId=1) | [![codecov](https://codecov.io/gh/atom/github/branch/master/graph/badge.svg)](https://codecov.io/gh/atom/github) | [![Greenkeeper badge](https://badges.greenkeeper.io/atom/github.svg)](https://greenkeeper.io/) [![Dependency Status](https://david-dm.org/atom/github.svg)](https://david-dm.org/atom/github) | The Atom GitHub package provides Git and GitHub integration for Atom. Check out [github.atom.io](https://github.atom.io) for more information. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 523e422cce..9e5d53c6ed 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -57,6 +57,11 @@ jobs: - bash: npm run report:coverage displayName: generate code coverage reports condition: succeededOrFailed() + - bash: npm run codecov -- --build="Linux $(atom_channel)" + displayName: publish code coverage to CodeCov + env: + CODECOV_TOKEN: $(codecov.token) + condition: succeededOrFailed() - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: cobertura @@ -101,6 +106,11 @@ jobs: - bash: npm run report:coverage displayName: generate code coverage reports condition: succeededOrFailed() + - bash: npm run codecov -- --build="MacOS $(atom_channel)" + displayName: publish code coverage to CodeCov + env: + CODECOV_TOKEN: $(codecov.token) + condition: succeededOrFailed() - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: cobertura @@ -165,6 +175,11 @@ jobs: - powershell: npm run report:coverage displayName: generate code coverage reports condition: succeededOrFailed() + - powershell: npm run codecov -- --build="Windows $(atom_channel)" + displayName: publish code coverage to CodeCov + env: + CODECOV_TOKEN: $(codecov.token) + condition: succeededOrFailed() - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: cobertura diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..f9753da84b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +coverage: + status: + project: + default: + # Allow coverage to drop by as much as 2% from the parent commit or pull request base + threshold: 2 + + patch: + default: + threshold: 2 + + changes: + default: + threshold: 2 diff --git a/package-lock.json b/package-lock.json index 3b1189c3a0..2c93c7219a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -341,6 +341,12 @@ "sprintf-js": "~1.0.2" } }, + "argv": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", + "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", + "dev": true + }, "aria-query": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", @@ -2018,6 +2024,31 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "codecov": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.1.0.tgz", + "integrity": "sha512-aWQc/rtHbcWEQLka6WmBAOpV58J2TwyXqlpAQGhQaSiEUoigTTUk6lLd2vB3kXkhnDyzyH74RXfmV4dq2txmdA==", + "dev": true, + "requires": { + "argv": "^0.0.2", + "ignore-walk": "^3.0.1", + "js-yaml": "^3.12.0", + "request": "^2.87.0", + "urlgrey": "^0.4.4" + }, + "dependencies": { + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -2121,19 +2152,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "coveralls": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.1.tgz", - "integrity": "sha1-EuFZFOqikgTlaGml7Oe54UktKuI=", - "dev": true, - "requires": { - "js-yaml": "^3.6.1", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.5", - "minimist": "^1.2.0", - "request": "^2.79.0" - } - }, "cross-env": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz", @@ -4084,6 +4102,15 @@ "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", "dev": true }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, "image-size": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", @@ -4789,12 +4816,6 @@ "invert-kv": "^1.0.0" } }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, "less": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz", @@ -4974,12 +4995,6 @@ "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=" }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha1-Y7lQIfBwL+36LJuwok53l9cYcdg=", - "dev": true - }, "lolex": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", @@ -8331,6 +8346,12 @@ } } }, + "urlgrey": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", + "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", + "dev": true + }, "use": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", diff --git a/package.json b/package.json index 94ea85116d..4612715d88 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "test:coverage:html": "nyc --reporter=html npm run test:coverage", "test:coverage:lcov": "npm run test:coverage", "test:snapshot": "cross-env-shell ATOM_GITHUB_TEST_SUITE=snapshot \"${ATOM_SCRIPT_PATH:-atom} --test test\"", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "report:coverage": "nyc report --reporter=cobertura --reporter=html", + "codecov": "codecov", + "report:coverage": "nyc report --reporter=cobertura --reporter=html --reporter=lcovonly", "lint": "eslint --max-warnings 0 test lib", "fetch-schema": "node script/fetch-schema", "relay": "relay-compiler --src ./lib --schema graphql/schema.graphql" @@ -78,7 +78,7 @@ "babel-plugin-istanbul": "4.1.6", "chai": "4.1.2", "chai-as-promised": "7.1.1", - "coveralls": "^3.0.1", + "codecov": "3.1.0", "cross-env": "5.2.0", "cross-unzip": "0.2.1", "dedent-js": "1.0.1",