This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
220 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
**/node_modules/ | ||
*.log | ||
LICENSE | ||
*.md | ||
spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,32 @@ | ||
language: node_js | ||
dist: trusty | ||
os: | ||
- linux | ||
sudo: true | ||
env: | ||
- CXX=g++-4.8 | ||
language: cpp | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
cache: | ||
directories: | ||
- integrations/broid-alexa/node_modules | ||
- integrations/broid-callr/node_modules | ||
- integrations/broid-discord/node_modules | ||
- integrations/broid-flowdock/node_modules | ||
- integrations/broid-kik/node_modules | ||
- integrations/broid-line/node_modules | ||
- integrations/broid-messenger/node_modules | ||
- integrations/broid-ms-teams/node_modules | ||
- integrations/broid-schemas/node_modules | ||
- integrations/broid-skype/node_modules | ||
- integrations/broid-slack/node_modules | ||
- integrations/broid-telegram/node_modules | ||
- integrations/broid-twilio/node_modules | ||
- integrations/broid-twitter/node_modules | ||
- integrations/broid-utils/node_modules | ||
- integrations/broid-viber/node_modules | ||
- integrations/broid-irc/node_modules | ||
- integrations/broid-wechat/node_modules | ||
- integrations/broid-ms-team/node_modules | ||
node_js: | ||
- "6" | ||
before_install: | ||
- 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 | ||
- $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 | ||
- npm install -g nsp | ||
- yarn --version | ||
- export CXX=g++-4.8 | ||
- export BUILDTYPE="production"; | ||
before_script: | ||
- $CXX --version | ||
- chmod +x ./.ci/scripts/* | ||
- ./.ci/scripts/run-install.sh | ||
script: ./.ci/scripts/run-tests.sh | ||
- chmod +x ./_tools/test | ||
- ./_tools/test install | ||
script: ./_tools/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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/* /integrations/broid-alexa/src/ | ||
COPY ./broid-callr/src/* /integrations/broid-callr/src/ | ||
COPY ./broid-discord/src/* /integrations/broid-discord/src/ | ||
COPY ./broid-flowdock/src/* /integrations/broid-flowdock/src/ | ||
COPY ./broid-gitter/src/* /integrations/broid-gitter/src/ | ||
COPY ./broid-google-assistant/src/* /integrations/broid-google-assistant/src/ | ||
COPY ./broid-groupme/src/* /integrations/broid-groupme/src/ | ||
COPY ./broid-irc/src/* /integrations/broid-irc/src/ | ||
COPY ./broid-kik/src/* /integrations/broid-kik/src/ | ||
COPY ./broid-line/src/* /integrations/broid-line/src/ | ||
COPY ./broid-messenger/src/* /integrations/broid-messenger/src/ | ||
COPY ./broid-ms-teams/src/* /integrations/broid-ms-teams/src/ | ||
COPY ./broid-nexmo/src/* /integrations/broid-nexmo/src/ | ||
COPY ./broid-schemas/src/* /integrations/broid-schemas/src/ | ||
COPY ./broid-skype/src/* /integrations/broid-skype/src/ | ||
COPY ./broid-slack/src/* /integrations/broid-slack/src/ | ||
COPY ./broid-telegram/src/* /integrations/broid-telegram/src/ | ||
COPY ./broid-twilio/src/* /integrations/broid-twilio/src/ | ||
COPY ./broid-twitter/src/* /integrations/broid-twitter/src/ | ||
COPY ./broid-utils/src/* /integrations/broid-utils/src/ | ||
COPY ./broid-viber/src/* /integrations/broid-viber/src/ | ||
COPY ./broid-wechat/src/* /integrations/broid-wechat/src/ | ||
|
||
RUN /bin/sh _tools/scripts/run-tests.sh |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
SUFFIX=${1:-test} | ||
today=`date '+%Y_%m_%d__%H_%M_%S'`; | ||
filename="./Dockerfile.$SUFFIX.$today" | ||
|
||
echo $SUFFIX | ||
echo $filename | ||
|
||
echo "FROM node:6.9.4-alpine" | ||
echo "" | ||
echo "RUN apk --no-cache add ca-certificates curl make gcc g++ python linux-headers paxctl libgcc libstdc++ gnupg git wget && update-ca-certificates" | ||
echo "RUN mkdir -p /opt/yarn && cd /opt/yarn && wget https://yarnpkg.com/latest.tar.gz && tar zxf latest.tar.gz" | ||
echo "ENV PATH \"$PATH:/opt/yarn/dist/bin\"" | ||
echo "" | ||
echo "ARG CI_BRANCH" | ||
echo "ENV CI_BRANCH \$CI_BRANCH" | ||
echo "" | ||
echo "RUN mkdir -p /integrations" | ||
echo "WORKDIR /integrations/" | ||
echo "" | ||
echo "COPY ./_tools /integrations/_tools/" | ||
echo "RUN chmod +x _tools/scripts/run-install.sh" | ||
echo "RUN chmod +x _tools/scripts/run-tests.sh" | ||
echo "" | ||
for dir in ../../broid-* ; do | ||
dircleaned=${dir//[..\/]/} | ||
echo "COPY ./$dircleaned/package.json ./$dircleaned/yarn.lock /integrations/$dircleaned/" | ||
done | ||
echo "" | ||
echo "COPY ./.git /integrations/.git/" | ||
echo "" | ||
echo "RUN /bin/sh _tools/scripts/run-install.sh" | ||
echo "" | ||
for dir in ../../broid-* ; do | ||
dircleaned=${dir//[..\/]/} | ||
echo "COPY ./$dircleaned/src/* /integrations/$dircleaned/src/" | ||
done | ||
echo "" | ||
echo "RUN /bin/sh _tools/scripts/run-tests.sh" | ||
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
rootDir() { | ||
xargs -n1 | cut -d/ -f1 | ||
} | ||
|
||
integrations() { | ||
echo broid-*/package.json | rootDir | sort | sed '/^_/d' | ||
} | ||
|
||
revelant_directories() { | ||
git diff --name-only "origin/master...$CI_BRANCH" | rootDir | sort | uniq | | ||
grep -E -i -w '(broid-)\w+' # Get only broid integrations paths | ||
} | ||
|
||
integrations_changed() { | ||
integrations > .integrations | ||
revelant_directories > .revelant_directories | ||
comm -12 .integrations .revelant_directories | ||
} | ||
|
||
echo $(integrations_changed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
source "$(dirname "$0")/get-modified.sh" | ||
|
||
echo "CI_BRANCH: $CI_BRANCH" | ||
|
||
INTS_UPDATED=$(integrations_changed) | ||
echo $INTS_UPDATED | ||
|
||
for integration in $INTS_UPDATED; do | ||
echo "> Install dependencies for $integration" | ||
(cd "$integration" && yarn install --ignore-scripts) | ||
done | ||
|
||
echo "> Install dependencies finished" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source "$(dirname "$0")/get-modified.sh" | ||
|
||
echo "CI_BRANCH: $CI_BRANCH" | ||
|
||
INTS_UPDATED=$(integrations_changed) | ||
echo $INTS_UPDATED | ||
|
||
for integration in $INTS_UPDATED; do | ||
echo "> Run Tests for $integration" | ||
(cd "$integration" && yarn run travis) | ||
done | ||
|
||
echo "> Tests finished" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.