diff --git a/.circleci/config.yml b/.circleci/config.yml index ec3d0139aa..931b3112bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,13 +9,39 @@ defaults: &defaults LANG: en_US.UTF-8 LANGUAGE: en_US.UTF-8 LC_TYPE: en_US.UTF-8 - NODE_OPTIONS: --max_old_space_size=4096 + NODE_OPTIONS: --max_old_space_size=4096 --unhandled-rejections=strict version: 2.1 orbs: win: circleci/windows@2.4.0 executorType: docker jobs: + acceptance-test: + <<: *defaults + docker: + - image: "node:<>" + environment: + <<: *env + RUN_ACCEPTANCE_TESTS: true + parameters: + node-version: + type: "string" + steps: + - checkout + - restore_cache: &yarn_restore_cache + keys: + - v4-yarn-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }} + - v4-yarn-{{ checksum ".circleci/config.yml" }} + - v4-yarn + - run: + name: Installing dependencies + command: yarn --frozen-lockfile + - run: + name: heroku whoami + command: ./bin/run whoami + - run: + name: Smoke tests CLI + command: ./scripts/run-acceptance windows-test: executor: name: win/default @@ -141,15 +167,9 @@ jobs: - run: name: Installing dependencies command: yarn --frozen-lockfile - - run: - name: heroku whoami - command: ./bin/run whoami - run: name: Running all tests command: yarn test - - run: - name: Uploading code coverage to codecov - command: ./node_modules/.bin/lerna exec "curl -s https://codecov.io/bash | bash" node10-test: <<: *test docker: @@ -160,6 +180,53 @@ jobs: docker: - image: node:14 resource_class: xlarge + pack-windows: + <<: *defaults + steps: + - checkout + - restore_cache: *yarn_restore_cache + - run: | + mkdir -p /build + cp yarn.lock packages/cli + cd packages/cli + yarn --frozen-lockfile + - run: + name: Building Windows binaries + command: ./scripts/pack/win + - persist_to_workspace: + root: /cli/packages/cli + paths: + - dist + pack-tarballs: + <<: *defaults + steps: + - checkout + - restore_cache: *yarn_restore_cache + - run: | + mkdir -p /build + cp yarn.lock packages/cli + cd packages/cli + yarn --frozen-lockfile + - run: + name: Building Tarballs + command: ./scripts/pack/tarballs + - persist_to_workspace: + root: /cli/packages/cli + paths: + - dist + store-artifacts: + <<: *defaults + steps: + - attach_workspace: + at: /build + - checkout + - restore_cache: *yarn_restore_cache + - run: + name: "Create SHA256 artifacts" + command: ./scripts/hash-artifacts + - store_artifacts: + path: /build/dist + destination: / release_tarballs: <<: *defaults steps: @@ -214,15 +281,14 @@ jobs: <<: *defaults steps: - attach_workspace: - at: /persisted + at: /build - add_ssh_keys - checkout - run: | cp yarn.lock packages/cli cd packages/cli yarn --frozen-lockfile - cp -r /persisted/dist /cli/packages/cli - cp -r /persisted/tmp /cli/packages/cli + cp -r /build/dist /cli/packages/cli ./scripts/release/homebrew.js invalidate_cdn_cache: <<: *defaults @@ -280,71 +346,103 @@ workflows: - node14-test: *windows_test - node12-test: *windows_test - node10-test: *windows_test - heroku_cli_release: - jobs: - - node14-test: &node14_test - filters: - branches: - only: - - master - tags: &version_tags - only: /^v.*/ - - node12-test: *node14_test - - node10-test: *node14_test - - windows-test: *node14_test - - release_tarballs: &release_tarballs - requires: + - acceptance-test: + context: + - heroku-cli-acceptance-tests + matrix: + parameters: + node-version: + - "10" + - "12" + - "14" + - pack-windows: + requires: &pack-requires + - node14-test - node12-test - node10-test - windows-test - filters: &master_dev_and_version_tags - tags: - <<: *version_tags - branches: - only: - - master - - dev - - release_deb: *release_tarballs - - release_win: *release_tarballs - - release_homebrew: + - acceptance-test + - pack-tarballs: + requires: *pack-requires + - store-artifacts: requires: - - release_tarballs - filters: &only_version_tags - branches: - ignore: /.*/ - tags: - <<: *version_tags -# - trigger_macos: &trigger_macos + - pack-windows + - pack-tarballs +# heroku_cli_release: +# jobs: +# - node14-test: &node14_test +# filters: +# branches: +# only: +# - master +# tags: &version_tags +# only: /^v.*/ +# - node12-test: *node14_test +# - node10-test: *node14_test +# - windows-test: *node14_test +# - acceptance-test: +# context: +# - heroku-cli-acceptance-tests +# matrix: +# parameters: +# node-version: +# - "10" +# - "12" +# - "14" +# - release_tarballs: &release_tarballs # requires: # - node12-test # - node10-test # - windows-test +# - acceptance-test +# filters: &master_dev_and_version_tags +# tags: +# <<: *version_tags +# branches: +# only: +# - master +# - dev +# - release_deb: *release_tarballs +# - release_win: *release_tarballs +# - release_homebrew: +# requires: +# - release_tarballs +# filters: &only_version_tags +# branches: +# ignore: /.*/ +# tags: +# <<: *version_tags +# # - trigger_macos: &trigger_macos +# # requires: +# # - node12-test +# # - node10-test +# # - windows-test +# # filters: +# # <<: *only_version_tags +# # - release_snap: +# # requires: +# # - node12-test +# # - node10-test +# # - windows-test +# # filters: +# # <<: *only_version_tags +# - invalidate_cdn_cache: +# requires: +# - install_scripts +# filters: +# <<: *master_dev_and_version_tags +# - install_scripts: &install_scripts +# requires: +# - release_tarballs +# - release_deb +# - release_win +# filters: +# <<: *master_dev_and_version_tags +# - change_management: &change_management +# requires: +# - release_tarballs +# - release_deb +# - release_win # filters: # <<: *only_version_tags -# - release_snap: -# requires: -# - node12-test -# - node10-test -# - windows-test -# filters: -# <<: *only_version_tags - - invalidate_cdn_cache: - requires: - - install_scripts - filters: - <<: *master_dev_and_version_tags - - install_scripts: &install_scripts - requires: - - release_tarballs - - release_deb - - release_win - filters: - <<: *master_dev_and_version_tags - - change_management: &change_management - requires: - - release_tarballs - - release_deb - - release_win - filters: - <<: *only_version_tags - - dev_center_docs: *change_management +# - dev_center_docs: *change_management diff --git a/packages/addons-v5/README.md b/packages/addons-v5/README.md index 237b76ab90..c562224e50 100644 --- a/packages/addons-v5/README.md +++ b/packages/addons-v5/README.md @@ -1,7 +1,6 @@ # heroku-cli-addons [![Circle CI](https://circleci.com/gh/heroku/heroku-cli-addons.svg?style=svg)](https://circleci.com/gh/heroku/heroku-cli-addons) [![Code Climate](https://codeclimate.com/github/heroku/heroku-cli-addons/badges/gpa.svg)](https://codeclimate.com/github/heroku/heroku-cli-addons) -[![codecov](https://codecov.io/gh/heroku/heroku-cli-addons/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-addons) [![npm version](https://badge.fury.io/js/heroku-cli-addons.svg)](https://badge.fury.io/js/heroku-cli-addons) [![License](https://img.shields.io/github/license/heroku/heroku-cli-addons.svg)](https://github.com/heroku/heroku-cli-addons/blob/master/LICENSE) diff --git a/packages/addons-v5/circle.yml b/packages/addons-v5/circle.yml deleted file mode 100644 index 59fa7001b6..0000000000 --- a/packages/addons-v5/circle.yml +++ /dev/null @@ -1,13 +0,0 @@ -dependencies: - override: - - yarn - cache_directories: - - ~/.cache/yarn - -machine: - node: - version: v9.2.0 - -test: - post: - - ./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && bash <(curl -s https://codecov.io/bash) diff --git a/packages/apps-v5/.circleci/config.yml b/packages/apps-v5/.circleci/config.yml deleted file mode 100644 index 3d07142a55..0000000000 --- a/packages/apps-v5/.circleci/config.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - environment: - NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc" - MOCHA_FILE: "reports/mocha.xml" - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-yarn-{{checksum ".circleci/config.yml"}} - - run: .circleci/greenkeeper - - run: yarn add -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1 - - run: | - mkdir -p reports - $NYC yarn test --reporter mocha-junit-reporter - $NYC report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - - store_test_results: &store_test_results - path: ~/cli/reports - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: yarn global add @oclif/semantic-release@2 semantic-release@15 - - run: yarn --frozen-lockfile - - run: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-apps": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/apps-v5/README.md b/packages/apps-v5/README.md index 46a9056877..49ae2ffbea 100644 --- a/packages/apps-v5/README.md +++ b/packages/apps-v5/README.md @@ -2,7 +2,6 @@ heroku-apps [![Circle CI](https://circleci.com/gh/heroku/heroku-apps.svg?style=s =========== [![Code Climate](https://codeclimate.com/github/heroku/heroku-apps/badges/gpa.svg)](https://codeclimate.com/github/heroku/heroku-apps) -[![codecov](https://codecov.io/gh/heroku/heroku-apps/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-apps) [![npm version](https://badge.fury.io/js/heroku-apps.svg)](https://badge.fury.io/js/heroku-apps) [![License](https://img.shields.io/github/license/heroku/heroku-apps.svg)](https://github.com/heroku/heroku-apps/blob/master/LICENSE) [![Greenkeeper badge](https://badges.greenkeeper.io/heroku/heroku-apps.svg)](https://greenkeeper.io/) diff --git a/packages/apps-v5/appveyor.yml b/packages/apps-v5/appveyor.yml deleted file mode 100644 index c31ccbb2f8..0000000000 --- a/packages/apps-v5/appveyor.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -environment: - nodejs_version: "8" -cache: - - "%LOCALAPPDATA%\\Yarn" - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - ./node_modules/.bin/jest - -build: 'off' diff --git a/packages/apps/.circleci/config.yml b/packages/apps/.circleci/config.yml deleted file mode 100644 index 0599de6246..0000000000 --- a/packages/apps/.circleci/config.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: yarn - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - node-12: - <<: *test - docker: - - image: node:12 - node-10: - <<: *test - docker: - - image: node:10 - cache: - <<: *test - steps: - - checkout - - run: - name: Install dependencies - command: yarn - - save_cache: - key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "heroku-cli-plugin-apps": - jobs: - - node-latest - - node-12 - - node-10 - - cache: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/packages/auth/.circleci/config.yml b/packages/auth/.circleci/config.yml deleted file mode 100644 index 70b2172d1f..0000000000 --- a/packages/auth/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: - name: Install dependencies - command: | - yarn global add @oclif/semantic-release@3 semantic-release@15 - yarn --frozen-lockfile - - run: - name: Cutting release - command: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-auth": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - # - node-latest - - node-8 diff --git a/packages/auth/README.md b/packages/auth/README.md index da744de5a4..0bde4a6019 100644 --- a/packages/auth/README.md +++ b/packages/auth/README.md @@ -6,7 +6,6 @@ auth core plugin for Heroku CLI [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-auth.svg)](https://npmjs.org/package/@heroku-cli/plugin-auth) [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-plugin-auth/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/heroku-cli-plugin-auth/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-plugin-auth?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-plugin-auth/branch/master) -[![Codecov](https://codecov.io/gh/heroku/heroku-cli-plugin-auth/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-plugin-auth) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-auth.svg)](https://npmjs.org/package/@heroku-cli/plugin-auth) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-auth.svg)](https://github.com/heroku/heroku-cli-plugin-auth/blob/master/package.json) @@ -101,7 +100,7 @@ OPTIONS -h, --help show CLI help DESCRIPTION - By default, the CLI auth token is only valid for 1 year. To generate a long-lived token, use heroku + By default, the CLI auth token is only valid for 1 year. To generate a long-lived token, use heroku authorizations:create ``` diff --git a/packages/auth/appveyor.yml b/packages/auth/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/auth/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/autocomplete/.circleci/config.yml b/packages/autocomplete/.circleci/config.yml deleted file mode 100644 index e84e64bda2..0000000000 --- a/packages/autocomplete/.circleci/config.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - node-8: - <<: *test - docker: - - image: node:8 - -workflows: - version: 2 - "@heroku-cli/plugin-autocomplete": - jobs: - - node-latest - - node-8 diff --git a/packages/autocomplete/README.md b/packages/autocomplete/README.md index a8c2aa0f52..92f18121ad 100644 --- a/packages/autocomplete/README.md +++ b/packages/autocomplete/README.md @@ -6,7 +6,6 @@ [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-autocomplete.svg)](https://npmjs.org/package/@heroku-cli/plugin-autocomplete) [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-autocomplete/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/heroku-cli-autocomplete/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-autocomplete?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-autocomplete/branch/master) -[![Codecov](https://codecov.io/gh/heroku/heroku-cli-autocomplete/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-autocomplete) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-autocomplete.svg)](https://npmjs.org/package/@heroku-cli/plugin-autocomplete) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-autocomplete.svg)](https://github.com/heroku/heroku-cli-autocomplete/blob/master/package.json) diff --git a/packages/autocomplete/appveyor.yml b/packages/autocomplete/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/autocomplete/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/buildpacks/.circleci/config.yml b/packages/buildpacks/.circleci/config.yml deleted file mode 100644 index dd2ba3d202..0000000000 --- a/packages/buildpacks/.circleci/config.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - node-8: - <<: *test - docker: - - image: node:8 - -workflows: - version: 2 - "@heroku-cli/plugin-buildpacks": - jobs: - - node-latest - - node-8 diff --git a/packages/buildpacks/README.md b/packages/buildpacks/README.md index d585c9e836..cb3237acc5 100644 --- a/packages/buildpacks/README.md +++ b/packages/buildpacks/README.md @@ -9,7 +9,6 @@ [![CircleCI](https://circleci.com/gh/heroku/cli/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/cli/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/cli?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/cli/branch/master) -[![Codecov](https://codecov.io/gh/heroku/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/cli) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-buildpacks.svg)](https://npmjs.org/package/@heroku-cli/plugin-buildpacks) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-buildpacks.svg)](https://github.com/heroku/cli/blob/master/package.json) diff --git a/packages/buildpacks/appveyor.yml b/packages/buildpacks/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/buildpacks/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/certs-v5/.travis.yml b/packages/certs-v5/.travis.yml deleted file mode 100644 index 8c26f90c96..0000000000 --- a/packages/certs-v5/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "10" -after_success: - - nyc report --reporter=text-lcov > coverage.lcov && bash <(curl -s https://codecov.io/bash) diff --git a/packages/certs-v5/README.md b/packages/certs-v5/README.md index bbc43c28f7..14bb4fbcf9 100644 --- a/packages/certs-v5/README.md +++ b/packages/certs-v5/README.md @@ -2,7 +2,6 @@ heroku-certs =========== [![Build Status](https://travis-ci.org/heroku/heroku-certs.svg?branch=master)](https://travis-ci.org/heroku/heroku-certs) -[![codecov](https://codecov.io/gh/heroku/heroku-certs/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-certs) ## Commands diff --git a/packages/certs/.circleci/config.yml b/packages/certs/.circleci/config.yml deleted file mode 100644 index edb057eb7e..0000000000 --- a/packages/certs/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: - name: Install dependencies - command: | - yarn global add @oclif/semantic-release@3 semantic-release@15 - yarn --frozen-lockfile - - run: - name: Cutting release - command: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-certs": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/certs/README.md b/packages/certs/README.md index f02e0cec80..c83b24905a 100644 --- a/packages/certs/README.md +++ b/packages/certs/README.md @@ -6,7 +6,6 @@ [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-certs.svg)](https://npmjs.org/package/@heroku-cli/plugin-certs) [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-plugin-certs/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/heroku-cli-plugin-certs/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-plugin-certs?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-plugin-certs/branch/master) -[![Codecov](https://codecov.io/gh/heroku/heroku-cli-plugin-certs/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-plugin-certs) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-certs.svg)](https://npmjs.org/package/@heroku-cli/plugin-certs) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-certs.svg)](https://github.com/heroku/heroku-cli-plugin-certs/blob/master/package.json) diff --git a/packages/certs/appveyor.yml b/packages/certs/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/certs/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/ci/.circleci/config.yml b/packages/ci/.circleci/config.yml deleted file mode 100644 index ad49812eb9..0000000000 --- a/packages/ci/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: - name: Install dependencies - command: | - yarn global add @oclif/semantic-release@3 semantic-release@15 - yarn --frozen-lockfile - - run: - name: Cutting release - command: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-ci": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/ci/README.md b/packages/ci/README.md index 9b502b8528..53b7fa5093 100644 --- a/packages/ci/README.md +++ b/packages/ci/README.md @@ -9,7 +9,6 @@ Heroku CLI plugin for Heroku CI [![CircleCI](https://circleci.com/gh/heroku/cli/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/cli/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/cli?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/cli/branch/master) -[![Codecov](https://codecov.io/gh/heroku/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/cli) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-ci.svg)](https://npmjs.org/package/@heroku-cli/plugin-ci) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-ci.svg)](https://github.com/heroku/cli/blob/master/package.json) diff --git a/packages/ci/appveyor.yml b/packages/ci/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/ci/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/cli/test/acceptance/smoke.test.ts b/packages/cli/test/acceptance/smoke.test.ts index 97c690ef78..cd0c725929 100755 --- a/packages/cli/test/acceptance/smoke.test.ts +++ b/packages/cli/test/acceptance/smoke.test.ts @@ -13,7 +13,13 @@ function run(args = '') { return qq.x([bin, args].join(' '), {stdio: undefined}) } -describe('smoke', () => { +let describeOrSkip: Mocha.SuiteFunction | Mocha.PendingSuiteFunction = describe + +if (process.env.CI && process.env.RUN_ACCEPTANCE_TESTS !== 'true') { + describeOrSkip = describe.skip.bind(describe) +} + +describeOrSkip('@acceptance smoke tests', () => { it('heroku version', async () => { const {stdout} = await run('version') expect(stdout).to.match(/^heroku\//) diff --git a/packages/config/.circleci/config.yml b/packages/config/.circleci/config.yml deleted file mode 100644 index 8504dda5be..0000000000 --- a/packages/config/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: - name: Install dependencies - command: | - yarn global add @oclif/semantic-release@3 semantic-release@15 - yarn --frozen-lockfile - - run: - name: Cutting release - command: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-config": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/config/README.md b/packages/config/README.md index f364f08435..a9d4a7508d 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -6,7 +6,6 @@ [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-config.svg)](https://npmjs.org/package/@heroku-cli/plugin-config) [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-plugin-config/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/heroku-cli-plugin-config/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-plugin-config?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-plugin-config/branch/master) -[![Codecov](https://codecov.io/gh/heroku/heroku-cli-plugin-config/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-plugin-config) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-config.svg)](https://npmjs.org/package/@heroku-cli/plugin-config) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-config.svg)](https://github.com/heroku/heroku-cli-plugin-config/blob/master/package.json) diff --git a/packages/config/appveyor.yml b/packages/config/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/config/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/container-registry-v5/circle.yml b/packages/container-registry-v5/circle.yml deleted file mode 100644 index 1b8ab2380a..0000000000 --- a/packages/container-registry-v5/circle.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -machine: - node: - version: v8.5.0 - services: - - docker -test: - pre: - - mkdir -p $CIRCLE_TEST_REPORTS/mocha - override: - - nyc mocha test - - standard - post: - - nyc report --reporter=text-lcov > coverage.lcov && bash <(curl -s https://codecov.io/bash) diff --git a/packages/git/.circleci/config.yml b/packages/git/.circleci/config.yml deleted file mode 100644 index 3ec3891660..0000000000 --- a/packages/git/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: .circleci/greenkeeper - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: - name: Install dependencies - command: | - yarn global add @oclif/semantic-release@3 semantic-release@15 - yarn --frozen-lockfile - - run: - name: Cutting release - command: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-git": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/git/.travis.yml b/packages/git/.travis.yml deleted file mode 100644 index c42701fff0..0000000000 --- a/packages/git/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "iojs" diff --git a/packages/git/README.md b/packages/git/README.md index a3a4724dcf..5f402d9614 100644 --- a/packages/git/README.md +++ b/packages/git/README.md @@ -6,7 +6,6 @@ Heroku CLI plugin to manage local git repos. [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-git.svg)](https://npmjs.org/package/@heroku-cli/plugin-git) [![CircleCI](https://circleci.com/gh/[object Object]/tree/master.svg?style=shield)](https://circleci.com/gh/[object Object]/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/[object Object]?branch=master&svg=true)](https://ci.appveyor.com/project/[object Object]/branch/master) -[![Codecov](https://codecov.io/gh/[object Object]/branch/master/graph/badge.svg)](https://codecov.io/gh/[object Object]) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-git.svg)](https://npmjs.org/package/@heroku-cli/plugin-git) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-git.svg)](https://github.com/[object Object]/blob/master/package.json) diff --git a/packages/git/appveyor.yml b/packages/git/appveyor.yml deleted file mode 100644 index fb7fb5b27f..0000000000 --- a/packages/git/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/git/circle.yml b/packages/git/circle.yml deleted file mode 100644 index 622d4bbc5e..0000000000 --- a/packages/git/circle.yml +++ /dev/null @@ -1,11 +0,0 @@ -machine: - node: - version: 6.2.0 -test: - pre: - - mkdir -p $CIRCLE_TEST_REPORTS/mocha - override: - - MOCHA_FILE=$CIRCLE_TEST_REPORTS/mocha/results.xml nyc mocha test -R mocha-junit-reporter - - standard - post: - - nyc report --reporter=text-lcov > coverage.lcov && bash <(curl -s https://codecov.io/bash) diff --git a/packages/local/.circleci/config.yml b/packages/local/.circleci/config.yml deleted file mode 100644 index 5c9c223824..0000000000 --- a/packages/local/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: yarn - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - node-10: - <<: *test - docker: - - image: node:10 - cache: - <<: *test - steps: - - checkout - - run: - name: Install dependencies - command: yarn - - save_cache: - key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "local": - jobs: - - node-latest - - node-8 - - node-10 - - cache: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/packages/local/README.md b/packages/local/README.md index 2b50e0569f..8b37b1f0ad 100644 --- a/packages/local/README.md +++ b/packages/local/README.md @@ -7,7 +7,6 @@ local [![Version](https://img.shields.io/npm/v/local.svg)](https://npmjs.org/package/local) [![CircleCI](https://circleci.com/gh/chadian/local/tree/master.svg?style=shield)](https://circleci.com/gh/chadian/local/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/chadian/local?branch=master&svg=true)](https://ci.appveyor.com/project/chadian/local/branch/master) -[![Codecov](https://codecov.io/gh/chadian/local/branch/master/graph/badge.svg)](https://codecov.io/gh/chadian/local) [![Downloads/week](https://img.shields.io/npm/dw/local.svg)](https://npmjs.org/package/local) [![License](https://img.shields.io/npm/l/local.svg)](https://github.com/chadian/local/blob/master/package.json) diff --git a/packages/local/appveyor.yml b/packages/local/appveyor.yml deleted file mode 100644 index b2537719ab..0000000000 --- a/packages/local/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -environment: - nodejs_version: "10" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test - -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - - -build: off - diff --git a/packages/oauth-v5/.circleci/config.yml b/packages/oauth-v5/.circleci/config.yml deleted file mode 100644 index c08af6d418..0000000000 --- a/packages/oauth-v5/.circleci/config.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-yarn-{{checksum ".circleci/config.yml"}} - - run: .circleci/greenkeeper - - run: yarn - - run: | - yarn test - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - - store_test_results: &store_test_results - path: ~/cli/reports - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: yarn global add @oclif/semantic-release@3 semantic-release@15 - - run: yarn --frozen-lockfile - - run: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-oauth": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/oauth-v5/README.md b/packages/oauth-v5/README.md index 0dc5810360..d8cc914c2f 100644 --- a/packages/oauth-v5/README.md +++ b/packages/oauth-v5/README.md @@ -1,6 +1,5 @@ # Heroku OAuth [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-oauth.svg?style=svg)](https://circleci.com/gh/heroku/heroku-cli-oauth) [![Code Climate](https://codeclimate.com/github/heroku/heroku-cli-oauth/badges/gpa.svg)](https://codeclimate.com/github/heroku/heroku-cli-oauth) -[![codecov](https://codecov.io/gh/heroku/heroku-cli-oauth/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-oauth) [![npm version](https://badge.fury.io/js/heroku-cli-oauth.svg)](https://badge.fury.io/js/heroku-cli-oauth) [![License](https://img.shields.io/github/license/heroku/heroku-cli-oauth.svg)](https://github.com/heroku/heroku-cli-oauth/blob/master/LICENSE) diff --git a/packages/oauth/.circleci/config.yml b/packages/oauth/.circleci/config.yml deleted file mode 100644 index 40b2b73ba2..0000000000 --- a/packages/oauth/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: yarn - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - node-10: - <<: *test - docker: - - image: node:10 - cache: - <<: *test - steps: - - checkout - - run: - name: Install dependencies - command: yarn - - save_cache: - key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-oauth": - jobs: - - node-latest - - node-8 - - node-10 - - cache: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/packages/orgs-v5/.circleci/config.yml b/packages/orgs-v5/.circleci/config.yml deleted file mode 100644 index c1e45a4f7a..0000000000 --- a/packages/orgs-v5/.circleci/config.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -version: 2 -jobs: - build: - working_directory: /cli - docker: - - image: node:8 - steps: - - checkout - - restore_cache: - keys: - - v1-yarn-{{ .Branch }}-{{checksum "yarn.lock"}} - - v1-yarn-{{ .Branch }} - - v1-yarn-master - - run: {command: "yarn"} - - run: {command: "npx standard", when: always} - - run: {command: "npx nyc mocha", when: always} - - run: {command: "npx nyc report --reporter=text-lcov > coverage.lcov && bash <(curl -s https://codecov.io/bash)"} - - save_cache: - key: v1-yarn-{{ .Branch }}-{{checksum "yarn.lock"}} - paths: - - /cli/node_modules - - /usr/local/share/.cache/yarn diff --git a/packages/orgs-v5/README.md b/packages/orgs-v5/README.md index 354d7fac18..1c54845dd4 100644 --- a/packages/orgs-v5/README.md +++ b/packages/orgs-v5/README.md @@ -1,7 +1,6 @@ Heroku Orgs CLI [![CircleCI](https://circleci.com/gh/heroku/heroku-orgs/tree/master.svg?style=svg)](https://circleci.com/gh/heroku/heroku-orgs/tree/master) =========== [![Code Climate](https://codeclimate.com/github/heroku/heroku-orgs/badges/gpa.svg)](https://codeclimate.com/github/heroku/heroku-orgs) -[![codecov](https://codecov.io/gh/heroku/heroku-orgs/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-orgs) [![npm version](https://badge.fury.io/js/heroku-orgs.svg)](https://badge.fury.io/js/heroku-orgs) [![License](https://img.shields.io/github/license/heroku/heroku-orgs.svg)](https://github.com/heroku/heroku-orgs/blob/master/LICENSE) diff --git a/packages/pg-v5/README.md b/packages/pg-v5/README.md index dcf3102fc9..7755577c18 100644 --- a/packages/pg-v5/README.md +++ b/packages/pg-v5/README.md @@ -2,7 +2,6 @@ Heroku Postgres CLI Plugin [![Circle CI](https://circleci.com/gh/heroku/heroku-p ========================== [![Code Climate](https://codeclimate.com/github/heroku/heroku-pg/badges/gpa.svg)](https://codeclimate.com/github/heroku/heroku-pg) -[![codecov](https://codecov.io/gh/heroku/heroku-pg/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-pg) [![npm version](https://badge.fury.io/js/heroku-pg.svg)](https://badge.fury.io/js/heroku-pg) [![License](https://img.shields.io/github/license/heroku/heroku-pg.svg)](https://github.com/heroku/heroku-pg/blob/master/LICENSE) diff --git a/packages/pg-v5/circle.yml b/packages/pg-v5/circle.yml deleted file mode 100644 index 28064fc395..0000000000 --- a/packages/pg-v5/circle.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -dependencies: - override: - - yarn - cache_directories: - - ~/.cache/yarn - -machine: - node: - version: v9.4.0 - -test: - post: - - ./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && bash <(curl -s https://codecov.io/bash) diff --git a/packages/pipelines/.circleci/config.yml b/packages/pipelines/.circleci/config.yml deleted file mode 100644 index a4b31b887e..0000000000 --- a/packages/pipelines/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: yarn - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - node-10: - <<: *test - docker: - - image: node:10 - cache: - <<: *test - steps: - - checkout - - run: - name: Install dependencies - command: yarn - - save_cache: - key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "reviewapps": - jobs: - - node-latest - - node-8 - - node-10 - - cache: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/packages/pipelines/appveyor.yml b/packages/pipelines/appveyor.yml deleted file mode 100644 index b2537719ab..0000000000 --- a/packages/pipelines/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -environment: - nodejs_version: "10" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test - -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - - -build: off - diff --git a/packages/ps/.circleci/config.yml b/packages/ps/.circleci/config.yml deleted file mode 100644 index 2f1b68b604..0000000000 --- a/packages/ps/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - environment: - NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc" - MOCHA_FILE: "reports/mocha.xml" - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-yarn-{{checksum ".circleci/config.yml"}} - - run: .circleci/greenkeeper - - run: yarn add -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1 - - run: ./bin/run --help - - run: | - mkdir -p reports - $NYC yarn test --reporter mocha-junit-reporter - $NYC report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - - store_test_results: &store_test_results - path: ~/cli/reports - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: yarn global add @oclif/semantic-release@2 semantic-release@15 - - run: yarn --frozen-lockfile - - run: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-ps": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/ps/README.md b/packages/ps/README.md index f272f76c6a..3df8606b4a 100644 --- a/packages/ps/README.md +++ b/packages/ps/README.md @@ -6,7 +6,6 @@ ps core plugin for Heroku CLI [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-ps.svg)](https://npmjs.org/package/@heroku-cli/plugin-ps) [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-plugin-ps/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/heroku-cli-plugin-ps/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-plugin-ps?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-plugin-ps/branch/master) -[![Codecov](https://codecov.io/gh/heroku/heroku-cli-plugin-ps/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-plugin-ps) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-ps.svg)](https://npmjs.org/package/@heroku-cli/plugin-ps) [![License](https://img.shields.io/npm/l/@heroku-cli/plugin-ps.svg)](https://github.com/heroku/heroku-cli-plugin-ps/blob/master/package.json) diff --git a/packages/ps/appveyor.yml b/packages/ps/appveyor.yml deleted file mode 100644 index 13e0aa767a..0000000000 --- a/packages/ps/appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - nodejs_version: "9" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn add -D nyc@11 @oclif/nyc-config@1 -test_script: - - .\bin\run --help - - .\node_modules\.bin\nyc --nycrc-path node_modules/@oclif/nyc-config/.nycrc yarn test -after_test: - - .\node_modules\.bin\nyc --nycrc-path node_modules/@oclif/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - -build: off - diff --git a/packages/redis-v5/.travis.yml b/packages/redis-v5/.travis.yml deleted file mode 100644 index a0f76f931a..0000000000 --- a/packages/redis-v5/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -sudo: false -node_js: - - "10.1.0" -notifications: - email: false diff --git a/packages/run-v5/.circleci/config.yml b/packages/run-v5/.circleci/config.yml deleted file mode 100644 index 0a96471740..0000000000 --- a/packages/run-v5/.circleci/config.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - environment: - NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc" - MOCHA_FILE: "reports/mocha.xml" - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v1-yarn-{{checksum ".circleci/config.yml"}} - - run: .circleci/greenkeeper - - run: yarn add -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1 - - run: | - mkdir -p reports - $NYC yarn test --reporter mocha-junit-reporter - $NYC report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - - store_test_results: &store_test_results - path: ~/cli/reports - node-8: - <<: *test - docker: - - image: node:8 - release: - <<: *test - steps: - - add_ssh_keys - - checkout - - restore_cache: *restore_cache - - run: yarn global add @oclif/semantic-release@3 semantic-release@15 - - run: yarn --frozen-lockfile - - run: | - export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH - semantic-release -e @oclif/semantic-release - - save_cache: - key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-run": - jobs: - - node-latest - - node-8 - - release: - filters: - branches: {only: master} - requires: - - node-latest - - node-8 diff --git a/packages/run-v5/README.md b/packages/run-v5/README.md index c8e7d065f2..9c03b334d2 100644 --- a/packages/run-v5/README.md +++ b/packages/run-v5/README.md @@ -1,7 +1,6 @@ heroku-run [![Circle CI](https://circleci.com/gh/heroku/heroku-run.svg?style=svg)](https://circleci.com/gh/heroku/heroku-run) ========== -[![codecov](https://codecov.io/gh/heroku/heroku-run/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-run) [![License](https://img.shields.io/github/license/heroku/heroku-run.svg)](https://github.com/heroku/heroku-run/blob/master/LICENSE) Heroku CLI plugin to run one-off dyno processes. diff --git a/packages/run-v5/package.json b/packages/run-v5/package.json index 1902d86d28..d3c71f3ab3 100644 --- a/packages/run-v5/package.json +++ b/packages/run-v5/package.json @@ -53,6 +53,7 @@ "postpack": "rm oclif.manifest.json", "prepack": "oclif-dev manifest", "test": "mocha", + "test:acceptance": "yarn test --grep='@acceptance'", "version": "oclif-dev readme && git add README.md" } } diff --git a/packages/run-v5/test/commands/detached.js b/packages/run-v5/test/commands/detached.js index 72502c1073..27d616aad8 100644 --- a/packages/run-v5/test/commands/detached.js +++ b/packages/run-v5/test/commands/detached.js @@ -3,8 +3,9 @@ const cmd = require('../../commands/run/detached') const { expect } = require('chai') const cli = require('heroku-cli-util') +const { describeAcceptance } = require('../test-helper') -describe('run:detached', () => { +describeAcceptance('run:detached', () => { beforeEach(() => cli.mockConsole()) it('runs a command', () => { diff --git a/packages/run-v5/test/commands/logs.js b/packages/run-v5/test/commands/logs.js index 89641fb974..5a129cf306 100644 --- a/packages/run-v5/test/commands/logs.js +++ b/packages/run-v5/test/commands/logs.js @@ -3,8 +3,9 @@ const cmd = require('../../commands/logs') const cli = require('heroku-cli-util') const { expect } = require('chai') +const { describeAcceptance } = require('../test-helper') -describe('logs', () => { +describeAcceptance('logs', () => { beforeEach(() => cli.mockConsole()) it('shows the logs', () => { diff --git a/packages/run-v5/test/commands/run.js b/packages/run-v5/test/commands/run.js index fc4179f277..bcf936e800 100644 --- a/packages/run-v5/test/commands/run.js +++ b/packages/run-v5/test/commands/run.js @@ -5,8 +5,9 @@ const cmd = require('../../commands/run') const { expect } = require('chai') const StdOutFixture = require('fixture-stdout') const assertExit = require('../assert_exit') +const { describeAcceptance } = require('../test-helper') -describe('run', () => { +describeAcceptance('run', () => { beforeEach(() => cli.mockConsole()) it('runs a command', () => { diff --git a/packages/run-v5/test/test-helper.js b/packages/run-v5/test/test-helper.js new file mode 100644 index 0000000000..fbb34ed99c --- /dev/null +++ b/packages/run-v5/test/test-helper.js @@ -0,0 +1,15 @@ + + +function describeAcceptance(name, ...rest) { + const describeName = `@acceptance ${name}` + + let describeOrSkip = describe; + + if (process.env.CI && process.env.RUN_ACCEPTANCE_TESTS !== 'true') { + describeOrSkip = describe.skip.bind(describe) + } + + return describeOrSkip(describeName, ...rest) +} + +exports.describeAcceptance = describeAcceptance \ No newline at end of file diff --git a/packages/run/.circleci/config.yml b/packages/run/.circleci/config.yml deleted file mode 100644 index e2cfe91da1..0000000000 --- a/packages/run/.circleci/config.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: yarn - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - node-8: - <<: *test - docker: - - image: node:8 - node-10: - <<: *test - docker: - - image: node:10 - cache: - <<: *test - steps: - - checkout - - run: - name: Install dependencies - command: yarn - - save_cache: - key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "@heroku-cli/plugin-run": - jobs: - - node-latest - - node-8 - - node-10 - - cache: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/packages/run/appveyor.yml b/packages/run/appveyor.yml deleted file mode 100644 index 8cb3d2869b..0000000000 --- a/packages/run/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -environment: - nodejs_version: "10" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test - - -build: off - diff --git a/packages/run/package.json b/packages/run/package.json index 44fb1098d4..6f917880e6 100644 --- a/packages/run/package.json +++ b/packages/run/package.json @@ -70,9 +70,8 @@ "postpack": "rm -f oclif.manifest.json", "prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme", "pretest": "tsc -p test --noEmit", - "test": "npm run test:unit", - "test:unit": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"", - "test:integration": "node ./bin/bats-test-runner", + "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"", + "test:acceptance": "yarn test --grep='@acceptance'", "posttest": "yarn lint", "version": "oclif-dev readme && git add README.md" } diff --git a/packages/run/test/commands/logs.test.ts b/packages/run/test/commands/logs.test.ts index 0cb9cad818..ed1751a08d 100644 --- a/packages/run/test/commands/logs.test.ts +++ b/packages/run/test/commands/logs.test.ts @@ -1,6 +1,12 @@ import {expect, test} from '@oclif/test' -describe('logs', () => { +let describeOrSkip: Mocha.SuiteFunction | Mocha.PendingSuiteFunction = describe + +if (process.env.CI && process.env.RUN_ACCEPTANCE_TESTS !== 'true') { + describeOrSkip = describe.skip.bind(describe) +} + +describeOrSkip('@acceptance logs', () => { test .stdout() .command(['logs', '--app=heroku-cli-ci-smoke-test-app']) diff --git a/packages/run/test/commands/run.test.ts b/packages/run/test/commands/run.test.ts index 25761a5646..ea505aa3a4 100644 --- a/packages/run/test/commands/run.test.ts +++ b/packages/run/test/commands/run.test.ts @@ -1,6 +1,12 @@ import {expect, test} from '@oclif/test' -describe('run', () => { +let describeOrSkip: Mocha.SuiteFunction | Mocha.PendingSuiteFunction = describe + +if (process.env.CI && process.env.RUN_ACCEPTANCE_TESTS !== 'true') { + describeOrSkip = describe.skip.bind(describe) +} + +describeOrSkip('@acceptance run', () => { const testFactory = () => { return test .stdout() diff --git a/packages/run/test/commands/run/detached.test.ts b/packages/run/test/commands/run/detached.test.ts index b61a14dea1..1d317c2ef3 100644 --- a/packages/run/test/commands/run/detached.test.ts +++ b/packages/run/test/commands/run/detached.test.ts @@ -1,6 +1,12 @@ import {expect, test} from '@oclif/test' -describe('run:detached', () => { +let describeOrSkip: Mocha.SuiteFunction | Mocha.PendingSuiteFunction = describe + +if (process.env.CI && process.env.RUN_ACCEPTANCE_TESTS !== 'true') { + describeOrSkip = describe.skip.bind(describe) +} + +describeOrSkip('@acceptance run:detached', () => { test .stdout() .command(['run:detached', '--app=heroku-cli-ci-smoke-test-app', 'echo 1 2 3']) diff --git a/packages/status/README.md b/packages/status/README.md index f71b91bf43..4b831f3b0d 100644 --- a/packages/status/README.md +++ b/packages/status/README.md @@ -4,7 +4,6 @@ CLI Plugin for [Heroku Status](https://status.heroku.com) [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-status.svg)](https://npmjs.org/package/@heroku-cli/plugin-status) [![CircleCI](https://circleci.com/gh/heroku/heroku-cli-status/tree/master.svg?style=svg)](https://circleci.com/gh/heroku/heroku-cli-status/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-status?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-status/branch/master) -[![Codecov](https://codecov.io/gh/heroku/heroku-cli-status/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-cli-status) [![Greenkeeper](https://badges.greenkeeper.io/heroku/heroku-cli-status.svg)](https://greenkeeper.io/) [![Known Vulnerabilities](https://snyk.io/test/npm/@heroku-cli/plugin-status/badge.svg)](https://snyk.io/test/npm/@heroku-cli/plugin-status) [![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-status.svg)](https://npmjs.org/package/@heroku-cli/plugin-status) diff --git a/packages/webhooks/.circleci/config.yml b/packages/webhooks/.circleci/config.yml deleted file mode 100644 index dd07079240..0000000000 --- a/packages/webhooks/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -version: 2 -jobs: - node-latest: &test - docker: - - image: node:latest - working_directory: ~/cli - steps: - - checkout - - restore_cache: &restore_cache - keys: - - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - - v1-npm-{{checksum ".circleci/config.yml"}} - - run: - name: Install dependencies - command: yarn - - run: ./bin/run --help - - run: - name: Testing - command: yarn test - - run: - name: Submitting code coverage to codecov - command: | - ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov - curl -s https://codecov.io/bash | bash - node-8: - <<: *test - docker: - - image: node:8 - node-10: - <<: *test - docker: - - image: node:10 - cache: - <<: *test - steps: - - checkout - - run: - name: Install dependencies - command: yarn - - save_cache: - key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} - paths: - - ~/cli/node_modules - - /usr/local/share/.cache/yarn - - /usr/local/share/.config/yarn - -workflows: - version: 2 - "webhooks": - jobs: - - node-latest - - node-8 - - node-10 - - cache: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/packages/webhooks/README.md b/packages/webhooks/README.md index 8bcc858916..8e40e4eb79 100644 --- a/packages/webhooks/README.md +++ b/packages/webhooks/README.md @@ -7,7 +7,6 @@ webhooks [![Version](https://img.shields.io/npm/v/webhooks.svg)](https://npmjs.org/package/webhooks) [![CircleCI](https://circleci.com/gh/chadian/webhooks/tree/master.svg?style=shield)](https://circleci.com/gh/chadian/webhooks/tree/master) [![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/chadian/webhooks?branch=master&svg=true)](https://ci.appveyor.com/project/chadian/webhooks/branch/master) -[![Codecov](https://codecov.io/gh/chadian/webhooks/branch/master/graph/badge.svg)](https://codecov.io/gh/chadian/webhooks) [![Downloads/week](https://img.shields.io/npm/dw/webhooks.svg)](https://npmjs.org/package/webhooks) [![License](https://img.shields.io/npm/l/webhooks.svg)](https://github.com/chadian/webhooks/blob/master/package.json) @@ -212,7 +211,7 @@ OPTIONS -u, --url=url (required) URL for receiver EXAMPLE - $ heroku webhooks:update 99999999-9999-9999-9999-999999999999 -i dyno -l notify -s + $ heroku webhooks:update 99999999-9999-9999-9999-999999999999 -i dyno -l notify -s 09928c40bf1b191b645174a19f7053d16a180da37332e719ef0998f4c0a2 -u https://example.com/hooks ``` diff --git a/packages/webhooks/appveyor.yml b/packages/webhooks/appveyor.yml deleted file mode 100644 index b2537719ab..0000000000 --- a/packages/webhooks/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -environment: - nodejs_version: "10" -cache: - - '%LOCALAPPDATA%\Yarn -> appveyor.yml' - - node_modules -> yarn.lock - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn -test_script: - - .\bin\run --help - - yarn test - -after_test: - - .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov - - ps: | - $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH - Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh - bash codecov.sh - - -build: off - diff --git a/scripts/hash-artifacts b/scripts/hash-artifacts new file mode 100755 index 0000000000..454dcbf648 --- /dev/null +++ b/scripts/hash-artifacts @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +const glob = require('glob') +const fs = require('fs') +const path = require('path') +const crypto = require('crypto') +const { EOL } = require('os') + +function sha256(filePath) { + const hash = crypto.createHash('sha256') + const stream = fs.createReadStream(filePath) + return new Promise((resolve, reject) => { + stream.on('data', (d) => hash.update(d)) + stream.on('end', () => { + resolve(hash.digest('hex')) + }) + stream.on('error', reject) + }) +} + + +async function main() { + const sha256TxtLines = [] + + const root = '/build/dist' + const fileManifestPromises = + glob.sync(`${root}/**/*`) + .filter((path) => fs.lstatSync(path).isFile()) + .map(async (filePath) => { + const sum = await sha256(filePath) + const rel = path.relative(root, filePath) + + sha256TxtLines.push([sum, rel]) + + return { + sha256: sum, + path: rel + } + }) + + const fileManifests = await Promise.all(fileManifestPromises) + + const asJSON = JSON.stringify({ + files: fileManifests + }, null, 2) + + fs.writeFileSync(path.join(root, 'SHA256.json'), asJSON) + + let asText = sha256TxtLines.map((line) => line.join(' ')).join(EOL) + asText = sha256TxtLines.length === 1 ? asText + EOL : asText + + fs.writeFileSync( + path.join(root, 'SHA256.txt'), + asText, + {encoding: 'utf8'} + ) +} + + +main() \ No newline at end of file diff --git a/scripts/pack/tarballs b/scripts/pack/tarballs new file mode 100755 index 0000000000..d2c6b6fbc1 --- /dev/null +++ b/scripts/pack/tarballs @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +const execa = require('execa') +const path = require('path') + +const root = path.join(__dirname, '..', '..') +const CLI_ROOT = path.join(root, 'packages', 'cli') + +async function main() { + await require('../utils/_update_channel')() + await execa('./node_modules/.bin/oclif-dev', ['pack'], { + cwd: CLI_ROOT, + stdio: 'inherit' + }) +} + +main() \ No newline at end of file diff --git a/scripts/pack/win b/scripts/pack/win new file mode 100755 index 0000000000..e51a21eabe --- /dev/null +++ b/scripts/pack/win @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +const execa = require('execa') +const path = require('path') + +const root = path.join(__dirname, '..', '..') +const CLI_ROOT = path.join(root, 'packages', 'cli') + +async function main() { + await require('../utils/_update_channel')() + await execa('./node_modules/.bin/oclif-dev', ['pack:win'], { + cwd: CLI_ROOT, + stdio: 'inherit', + }) +} + +main() \ No newline at end of file diff --git a/scripts/release/win b/scripts/release/win index b80a38edb0..56c48cd6f6 100755 --- a/scripts/release/win +++ b/scripts/release/win @@ -7,10 +7,10 @@ qq.run(async () => { await require('../utils/_update_channel')() const version = await require('../utils/_version')() await qq.x('./node_modules/.bin/oclif-dev pack:win') - await qq.x('echo "$HEROKU_WINDOWS_KEY" | base64 --decode > /tmp/heroku-windows-key') await qq.x(`mv dist/win/heroku-v${version}-x86.exe dist/win/heroku-v${version}-x86-unsigned.exe`) await qq.x(`mv dist/win/heroku-v${version}-x64.exe dist/win/heroku-v${version}-x64-unsigned.exe`) - await qq.x(`osslsigncode -pkcs12 /tmp/heroku-windows-key -pass "$HEROKU_WINDOWS_SIGNING_PASS" -n 'Heroku CLI' -i https://toolbelt.heroku.com/ -h sha512 -in dist/win/heroku-v${version}-x86-unsigned.exe -out dist/win/heroku-v${version}-x86.exe`) - await qq.x(`osslsigncode -pkcs12 /tmp/heroku-windows-key -pass "$HEROKU_WINDOWS_SIGNING_PASS" -n 'Heroku CLI' -i https://toolbelt.heroku.com/ -h sha512 -in dist/win/heroku-v${version}-x64-unsigned.exe -out dist/win/heroku-v${version}-x64.exe`) - await qq.x('./node_modules/.bin/oclif-dev publish:win') + // await qq.x('echo "$HEROKU_WINDOWS_KEY" | base64 --decode > /tmp/heroku-windows-key') + // await qq.x(`osslsigncode -pkcs12 /tmp/heroku-windows-key -pass "$HEROKU_WINDOWS_SIGNING_PASS" -n 'Heroku CLI' -i https://toolbelt.heroku.com/ -h sha512 -in dist/win/heroku-v${version}-x86-unsigned.exe -out dist/win/heroku-v${version}-x86.exe`) + // await qq.x(`osslsigncode -pkcs12 /tmp/heroku-windows-key -pass "$HEROKU_WINDOWS_SIGNING_PASS" -n 'Heroku CLI' -i https://toolbelt.heroku.com/ -h sha512 -in dist/win/heroku-v${version}-x64-unsigned.exe -out dist/win/heroku-v${version}-x64.exe`) + // await qq.x('./node_modules/.bin/oclif-dev publish:win') }) diff --git a/scripts/run-acceptance b/scripts/run-acceptance new file mode 100755 index 0000000000..805629a788 --- /dev/null +++ b/scripts/run-acceptance @@ -0,0 +1,24 @@ +#!/usr/bin/env node + +const glob = require('glob') +const path = require('path') +const execa = require('execa') + +const packages = glob.sync( + path.join(__dirname, '..', 'packages/*/package.json') +) + +async function main() { + for (const packageJSON of packages) { + const pjson = require(packageJSON) + if (pjson.scripts && pjson.scripts["test:acceptance"]) { + await execa('yarn', ['test:acceptance'], { + cwd: path.dirname(packageJSON), + stdio: 'inherit' + }) + } + } +} + + +main() \ No newline at end of file diff --git a/scripts/utils/_update_channel.js b/scripts/utils/_update_channel.js index 87775022b8..8c1baf2e51 100644 --- a/scripts/utils/_update_channel.js +++ b/scripts/utils/_update_channel.js @@ -1,7 +1,10 @@ const qq = require('qqjs') +const fs = require('fs') +const path = require('path') -module.exports = async () => { - const pjson = await qq.readJSON('./package.json') +module.exports = () => { + const pjsonPath = path.join(__dirname, '..', '..', 'packages', 'cli', 'package.json') + const pjson = require(pjsonPath) if (process.env.CIRCLE_TAG && process.env.CIRCLE_TAG.startsWith('v')) { pjson.version = pjson.version.split('-')[0] } else if (process.env.CIRCLE_BRANCH === 'master') { @@ -9,5 +12,5 @@ module.exports = async () => { } else { pjson.version = pjson.version.split('-')[0] + '-dev' } - await qq.writeJSON('./package.json', pjson) + fs.writeFileSync(pjsonPath, JSON.stringify(pjson, null, 2), {encoding: 'utf8'}) }