Permalink
Browse files

fix ci

  • Loading branch information...
killix committed Apr 13, 2017
1 parent 3b8cbf2 commit 353b200d5eaa0b2b7d6d7516b07f2584b5e8915c
Showing with 476 additions and 557 deletions.
  1. +0 −34 .travis.yml
  2. +0 −89 Dockerfile.test.2017_04_12__21_11_06
  3. +2 −2 README.md
  4. +11 −4 _tools/scripts/get-modified.sh
  5. +2 −2 _tools/scripts/run-install.sh
  6. +0 −53 _tools/test
  7. +3 −3 broid-alexa/package.json
  8. +27 −22 broid-alexa/yarn.lock
  9. +2 −2 broid-callr/package.json
  10. +27 −22 broid-callr/yarn.lock
  11. +2 −2 broid-discord/package.json
  12. +21 −16 broid-discord/yarn.lock
  13. +2 −2 broid-flowdock/package.json
  14. +21 −16 broid-flowdock/yarn.lock
  15. +2 −2 broid-gitter/package.json
  16. +21 −16 broid-gitter/yarn.lock
  17. +2 −2 broid-google-assistant/package.json
  18. +19 −14 broid-google-assistant/yarn.lock
  19. +2 −2 broid-groupme/package.json
  20. +20 −19 broid-groupme/yarn.lock
  21. +2 −2 broid-irc/package.json
  22. +19 −14 broid-irc/yarn.lock
  23. +2 −2 broid-kik/package.json
  24. +22 −21 broid-kik/yarn.lock
  25. +2 −2 broid-line/package.json
  26. +19 −14 broid-line/yarn.lock
  27. +2 −2 broid-messenger/package.json
  28. +19 −14 broid-messenger/yarn.lock
  29. +2 −2 broid-ms-teams/package.json
  30. +19 −14 broid-ms-teams/yarn.lock
  31. +2 −2 broid-nexmo/package.json
  32. +25 −20 broid-nexmo/yarn.lock
  33. +1 −1 broid-schemas/package.json
  34. +2 −2 broid-skype/package.json
  35. +19 −14 broid-skype/yarn.lock
  36. +2 −2 broid-slack/package.json
  37. +20 −19 broid-slack/yarn.lock
  38. +2 −2 broid-telegram/package.json
  39. +21 −16 broid-telegram/yarn.lock
  40. +2 −2 broid-twilio/package.json
  41. +19 −14 broid-twilio/yarn.lock
  42. +2 −2 broid-twitter/package.json
  43. +19 −14 broid-twitter/yarn.lock
  44. +1 −1 broid-utils/package.json
  45. +2 −2 broid-viber/package.json
  46. +19 −14 broid-viber/yarn.lock
  47. +2 −2 broid-wechat/package.json
  48. +19 −14 broid-wechat/yarn.lock
  49. +3 −3 wercker.yml
View
@@ -1,34 +0,0 @@
-os:
- - linux
-sudo: true
-language: cpp
-addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.8
- - build-essential
-notifications:
- email: false
-env:
- matrix:
- - TRAVIS_NODE_VERSION="6"
-install:
- - "rm -rf ~/.nvm && mkdir -p ~/.nvm && curl -sL `curl -sI https://github.com/creationix/nvm/releases/latest|sed -En 's/^Location: (.+)\\/releases\\/tag\\/(.+)/\\1\\/tarball\\/\\2/p'|tr -d '\r\n'`|tar zx --strip=1 -C ~/.nvm && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION"
- - npm --version
- - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; export CC=gcc-4.8; fi
- - export CONFIGFLAGS="CFLAGS=-m64 --enable-cuckoo --enable-magic"
- - $CXX --version
- # Repo for Yarn
- - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- - sudo apt-get update -qq
- - sudo apt-get install -y -qq yarn
- - sudo apt-get install -y -qq libmagic-dev
- - npm install -g nsp
- - yarn --version
-before_script:
- - chmod +x ./_tools/test
- - ./_tools/test install
-script: ./_tools/test
@@ -1,89 +0,0 @@
-FROM node:6.9.4-alpine
-
-RUN apk --no-cache add ca-certificates curl make gcc g++ python linux-headers paxctl libgcc libstdc++ gnupg git wget && update-ca-certificates
-RUN mkdir -p /opt/yarn && cd /opt/yarn && wget https://yarnpkg.com/latest.tar.gz && tar zxf latest.tar.gz
-ENV PATH "/Users/killix/.nvm/versions/node/v6.9.1/bin:/Users/killix/.local/google-cloud-sdk/bin:/usr/local/bin:/Users/killix/.gvm/pkgsets/go1.7.1/global/bin:/Users/killix/.gvm/gos/go1.7.1/bin:/Users/killix/.gvm/pkgsets/go1.7.1/global/overlay/bin:/Users/killix/.gvm/bin:/Users/killix/.gvm/bin:/Users/killix/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/killix/bin:/usr/local/Cellar/node/7.3.0/bin:/opt/yarn/dist/bin"
-
-ARG CI_BRANCH
-ENV CI_BRANCH $CI_BRANCH
-
-RUN mkdir -p /integrations
-WORKDIR /integrations/
-
-COPY ./_tools /integrations/_tools/
-RUN chmod +x _tools/scripts/run-install.sh
-RUN chmod +x _tools/scripts/run-tests.sh
-
-COPY ./broid-alexa/package.json ./broid-alexa/yarn.lock /integrations/broid-alexa/
-COPY ./broid-callr/package.json ./broid-callr/yarn.lock /integrations/broid-callr/
-COPY ./broid-discord/package.json ./broid-discord/yarn.lock /integrations/broid-discord/
-COPY ./broid-flowdock/package.json ./broid-flowdock/yarn.lock /integrations/broid-flowdock/
-COPY ./broid-gitter/package.json ./broid-gitter/yarn.lock /integrations/broid-gitter/
-COPY ./broid-google-assistant/package.json ./broid-google-assistant/yarn.lock /integrations/broid-google-assistant/
-COPY ./broid-groupme/package.json ./broid-groupme/yarn.lock /integrations/broid-groupme/
-COPY ./broid-irc/package.json ./broid-irc/yarn.lock /integrations/broid-irc/
-COPY ./broid-kik/package.json ./broid-kik/yarn.lock /integrations/broid-kik/
-COPY ./broid-line/package.json ./broid-line/yarn.lock /integrations/broid-line/
-COPY ./broid-messenger/package.json ./broid-messenger/yarn.lock /integrations/broid-messenger/
-COPY ./broid-ms-teams/package.json ./broid-ms-teams/yarn.lock /integrations/broid-ms-teams/
-COPY ./broid-nexmo/package.json ./broid-nexmo/yarn.lock /integrations/broid-nexmo/
-COPY ./broid-schemas/package.json ./broid-schemas/yarn.lock /integrations/broid-schemas/
-COPY ./broid-skype/package.json ./broid-skype/yarn.lock /integrations/broid-skype/
-COPY ./broid-slack/package.json ./broid-slack/yarn.lock /integrations/broid-slack/
-COPY ./broid-telegram/package.json ./broid-telegram/yarn.lock /integrations/broid-telegram/
-COPY ./broid-twilio/package.json ./broid-twilio/yarn.lock /integrations/broid-twilio/
-COPY ./broid-twitter/package.json ./broid-twitter/yarn.lock /integrations/broid-twitter/
-COPY ./broid-utils/package.json ./broid-utils/yarn.lock /integrations/broid-utils/
-COPY ./broid-viber/package.json ./broid-viber/yarn.lock /integrations/broid-viber/
-COPY ./broid-wechat/package.json ./broid-wechat/yarn.lock /integrations/broid-wechat/
-
-COPY ./.git /integrations/.git/
-
-RUN /bin/sh _tools/scripts/run-install.sh
-
-COPY ./broid-alexa/src/core /integrations/broid-alexa/src/core/
-COPY ./broid-alexa/src/test /integrations/broid-alexa/src/test/
-COPY ./broid-callr/src/core /integrations/broid-callr/src/core/
-COPY ./broid-callr/src/test /integrations/broid-callr/src/test/
-COPY ./broid-discord/src/core /integrations/broid-discord/src/core/
-COPY ./broid-discord/src/test /integrations/broid-discord/src/test/
-COPY ./broid-flowdock/src/core /integrations/broid-flowdock/src/core/
-COPY ./broid-flowdock/src/test /integrations/broid-flowdock/src/test/
-COPY ./broid-gitter/src/core /integrations/broid-gitter/src/core/
-COPY ./broid-gitter/src/test /integrations/broid-gitter/src/test/
-COPY ./broid-google-assistant/src/core /integrations/broid-google-assistant/src/core/
-COPY ./broid-google-assistant/src/test /integrations/broid-google-assistant/src/test/
-COPY ./broid-groupme/src/core /integrations/broid-groupme/src/core/
-COPY ./broid-groupme/src/test /integrations/broid-groupme/src/test/
-COPY ./broid-irc/src/core /integrations/broid-irc/src/core/
-COPY ./broid-irc/src/test /integrations/broid-irc/src/test/
-COPY ./broid-kik/src/core /integrations/broid-kik/src/core/
-COPY ./broid-kik/src/test /integrations/broid-kik/src/test/
-COPY ./broid-line/src/core /integrations/broid-line/src/core/
-COPY ./broid-line/src/test /integrations/broid-line/src/test/
-COPY ./broid-messenger/src/core /integrations/broid-messenger/src/core/
-COPY ./broid-messenger/src/test /integrations/broid-messenger/src/test/
-COPY ./broid-ms-teams/src/core /integrations/broid-ms-teams/src/core/
-COPY ./broid-ms-teams/src/test /integrations/broid-ms-teams/src/test/
-COPY ./broid-nexmo/src/core /integrations/broid-nexmo/src/core/
-COPY ./broid-nexmo/src/test /integrations/broid-nexmo/src/test/
-COPY ./broid-schemas/src/core /integrations/broid-schemas/src/core/
-COPY ./broid-schemas/src/test /integrations/broid-schemas/src/test/
-COPY ./broid-skype/src/core /integrations/broid-skype/src/core/
-COPY ./broid-skype/src/test /integrations/broid-skype/src/test/
-COPY ./broid-slack/src/core /integrations/broid-slack/src/core/
-COPY ./broid-slack/src/test /integrations/broid-slack/src/test/
-COPY ./broid-telegram/src/core /integrations/broid-telegram/src/core/
-COPY ./broid-telegram/src/test /integrations/broid-telegram/src/test/
-COPY ./broid-twilio/src/core /integrations/broid-twilio/src/core/
-COPY ./broid-twilio/src/test /integrations/broid-twilio/src/test/
-COPY ./broid-twitter/src/core /integrations/broid-twitter/src/core/
-COPY ./broid-twitter/src/test /integrations/broid-twitter/src/test/
-COPY ./broid-utils/src/core /integrations/broid-utils/src/core/
-COPY ./broid-utils/src/test /integrations/broid-utils/src/test/
-COPY ./broid-viber/src/core /integrations/broid-viber/src/core/
-COPY ./broid-viber/src/test /integrations/broid-viber/src/test/
-COPY ./broid-wechat/src/core /integrations/broid-wechat/src/core/
-COPY ./broid-wechat/src/test /integrations/broid-wechat/src/test/
-
-RUN /bin/sh _tools/scripts/run-tests.sh
View
@@ -114,8 +114,8 @@
[deps]:https://img.shields.io/badge/dependencies-checked-green.svg?style=flat
[deps-url]:#integrations
-[tests]:https://img.shields.io/travis/broidHQ/integrations/master.svg
-[tests-url]:https://travis-ci.org/broidHQ/integrations
+[tests]:https://app.wercker.com/status/661157f9db415b5b60bc8c2b92744604/s/master
+[tests-url]:https://app.wercker.com/project/byKey/661157f9db415b5b60bc8c2b92744604
[bithound]:https://img.shields.io/bithound/code/github/broidHQ/integrations.svg
[bithound-url]:https://www.bithound.io/github/broidHQ/integrations
@@ -1,5 +1,4 @@
-#!/bin/sh
-set -e
+#!/bin/sh -e
rootDir() {
xargs -n1 | cut -d/ -f1
@@ -10,7 +9,7 @@ integrations() {
}
revelant_directories() {
- git diff --name-only "origin/master...$CI_BRANCH" | rootDir | sort | uniq |
+ git diff --name-only origin/master -- "*.ts" "*.json" "*.js" | rootDir | sort | uniq |
grep -E -i -w '(broid-)\w+' # Get only broid integrations paths
}
@@ -20,4 +19,12 @@ integrations_changed() {
comm -12 .integrations .revelant_directories
}
-echo $(integrations_changed)
+INTS_UPDATED=$(integrations_changed)
+if [ ${#INTS_UPDATED[@]} -eq 0 ]; then
+ echo $(integrations)
+else
+ if [ -z "$INTS_UPDATED" ]; then
+ exit 1
+ fi
+ echo $INTS_UPDATED
+fi
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
set -e
source "$(dirname "$0")/get-modified.sh"
-echo "CI_BRANCH: $CI_BRANCH"
+echo "WERCKER_GIT_BRANCH: $WERCKER_GIT_BRANCH"
INTS_UPDATED=$(integrations_changed)
echo $INTS_UPDATED
View
@@ -1,53 +0,0 @@
-#!/bin/sh -e
-
-rootDir() {
- xargs -n1 | cut -d/ -f1
-}
-
-integrations() {
- echo broid-*/package.json | rootDir | sort | sed '/^_/d'
-}
-
-revelant_directories() {
- git diff --name-only "$TRAVIS_COMMIT" "$TRAVIS_BRANCH" | rootDir | sort | uniq
-}
-
-integrations_changed() {
- integrations > .integrations
- revelant_directories > .revelant_directories
- comm -12 .integrations .revelant_directories
-}
-
-INTS_UPDATED=$(integrations_changed)
-if [ ${#INTS_UPDATED[@]} -eq 0 ]; then
- echo "========= UPDATED FORCED ==========="
- INTS_UPDATED=$(integrations)
- echo "$INTS_UPDATED"
- echo "============================="
-else
- if [ -z "$INTS_UPDATED" ]; then
- exit 1
- fi
- echo "========= UPDATED ==========="
- echo "$INTS_UPDATED"
- echo "============================="
-fi
-
-command_install() {
- for integration in $INTS_UPDATED; do
- (cd "$integration" && yarn install --ignore-scripts)
- done
-}
-
-command_test() {
- for integration in $INTS_UPDATED; do
- echo "> Testing $integration"
- (
- cd "$integration"
- yarn run travis
- )
- done
-}
-
-# Execute given command, default to `test`
-"command_${1:-test}"
View
@@ -27,15 +27,15 @@
"node": ">=6.0.0"
},
"scripts": {
- "build": "yarn run clean && yarn run copy && yarn run copy:config && cat tsconfig.json && tsc --version && tsc -p tsconfig.json",
+ "build": "yarn run clean && yarn run copy && yarn run copy:config && tsc -p tsconfig.json",
"clean": "rm -rf lib && rm -rf tsconfig.json && rm -rf tslint.json",
"copy": "copyfiles -u 1 src/**/*.json lib/",
"copy:config": "cp ../_tools/tsconfig.json . && cp ../_tools/tslint.json .",
"lint": "yarn run copy:config && tslint -c tslint.json src/**/*.ts",
"lint:watch": "watch 'yarn run lint' src",
"nsp-check": "nsp check --warn-only -o summary",
"test": "yarn run lint && yarn run build && nyc ava --verbose",
- "travis": "yarn run nsp-check && yarn run test",
+ "travis": "yarn run test",
"tsc:watch": "yarn run build && tsc --watch",
"release": "yarn run travis && yarn run build && npm publish --access public",
"watch": "concurrently --kill-others \"yarn run lint:watch\" \"yarn run tsc:watch\""
@@ -61,7 +61,7 @@
},
"dependencies": {
"@broid/schemas": "^1.0.0",
- "@broid/utils": "^1.0.4",
+ "@broid/utils": "^1.1.0",
"bluebird": "^3.4.7",
"body-parser": "^1.16.0",
"express": "^4.14.0",
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -35,14 +35,14 @@
"lint:watch": "watch 'yarn run lint' src",
"nsp-check": "nsp check --warn-only -o summary",
"test": "yarn run lint && yarn run build && nyc ava --verbose",
- "travis": "yarn run nsp-check && yarn run test",
+ "travis": "yarn run test",
"tsc:watch": "yarn run build && tsc --watch",
"release": "yarn run travis && yarn run build && npm publish --access public",
"watch": "concurrently --kill-others \"yarn run lint:watch\" \"yarn run tsc:watch\""
},
"dependencies": {
"@broid/schemas": "^1.0.0",
- "@broid/utils": "^1.0.4",
+ "@broid/utils": "^1.1.0",
"bluebird": "^3.4.7",
"body-parser": "^1.15.2",
"callr": "^1.0.0",
Oops, something went wrong.

0 comments on commit 353b200

Please sign in to comment.