-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Testing Circle CI config * Separate network tests * Remove image definitions * Remove unnecessary parallelization * Remove old script * Add local docker steps
- Loading branch information
1 parent
f5e89f2
commit 81c586e
Showing
16 changed files
with
384 additions
and
104 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 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,39 @@ | ||
version: '3' | ||
# Note: This file is used to build run the integration tests. | ||
# for running integration tests | ||
# BROWSER=chrome BVER=stable docker-compose --file=./docker-compose.yml run integrationTests | ||
# to build container with browsers that will be used by integrationTests: | ||
# BROWSER=chrome BVER=stable docker-compose --file=./docker-compose.yml build browserContainer | ||
# to run bash for debugging the container: | ||
# BROWSER=chrome BVER=stable docker-compose --file=./docker-compose.yml run bash | ||
services: | ||
defaults: &defaults | ||
user: root | ||
image: twilio/twilio-video-browsers:${BROWSER}-${BVER} | ||
working_dir: /opt/app | ||
cap_add: | ||
- NET_ADMIN | ||
- NET_RAW | ||
runtimeDefaults: &runtimeDefaults | ||
<<: *defaults | ||
environment: | ||
- ENVIRONMENT | ||
- ACCOUNT_SID | ||
- API_KEY_SID | ||
- API_KEY_SECRET | ||
- APPLICATION_SID | ||
- APPLICATION_SID_STIR | ||
- CALLER_ID | ||
volumes: | ||
- "../../:/opt/app" | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /opt/app/node_modules | ||
integrationTests: # runs integration tets. Expects that sources are mounted. | ||
<<: *runtimeDefaults | ||
command: bash -c "npm install -g n && n 12 && npm install --no-optional --no-legacy-peer-deps && npm run build && ls -la /root && ls -la /root/.npm && npm run test:network" | ||
bash: # runs bash shell inside container. helpful for debugging | ||
<<: *runtimeDefaults | ||
command: bash | ||
getVersion: # print browser version installed in the container. | ||
<<: *runtimeDefaults | ||
command: /opt/app/.circleci/images/printbrowserversion.sh |
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,7 @@ | ||
#!/bin/bash | ||
if [ "${BROWSER}" == "firefox" ]; | ||
then | ||
echo $(firefox --version) | ||
else | ||
echo $(google-chrome --version) | ||
fi |
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,48 +1,13 @@ | ||
FROM node:8.16.0 | ||
ARG IMAGE=twilio/twilio-video-browsers:chrome-stable | ||
FROM $IMAGE | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
libasound2 \ | ||
libpango1.0-0 \ | ||
libxt6 \ | ||
wget \ | ||
bzip2 \ | ||
sudo \ | ||
libdbus-glib-1-2 \ | ||
libgtk-3-0 \ | ||
iptables \ | ||
net-tools \ | ||
&& adduser user1 && adduser user1 sudo && su - user1 | ||
RUN sudo apt-get update | ||
RUN sudo apt-get install -y libasound2 libpango1.0-0 libxt6 wget bzip2 sudo libdbus-glib-1-2 libgtk-3-0 iptables net-tools | ||
RUN sudo groupadd docker | ||
RUN sudo usermod -aG docker user1 | ||
RUN sudo su user1 | ||
|
||
WORKDIR /app | ||
|
||
ARG BVER='stable' | ||
|
||
RUN echo "Installing Chrome: $BVER" \ | ||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \ | ||
&& apt-get update \ | ||
&& echo "Installing google-chrome-$BVER from apt-get" \ | ||
&& apt-get install -y google-chrome-$BVER \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "Installing Firefox: $BVER" \ | ||
&& if [ $BVER = "beta" ] \ | ||
;then \ | ||
FIREFOX_DOWNLOAD_URL="https://download.mozilla.org/?product=firefox-beta-latest-ssl&os=linux64&lang=en-US" \ | ||
;elif [ $BVER = "unstable" ] \ | ||
;then \ | ||
FIREFOX_DOWNLOAD_URL="https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US" \ | ||
;else \ | ||
FIREFOX_DOWNLOAD_URL="https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US" \ | ||
;fi \ | ||
&& echo "Firefox Download URL: $FIREFOX_DOWNLOAD_URL" \ | ||
&& mkdir /application \ | ||
&& cd /application \ | ||
&& wget -O - $FIREFOX_DOWNLOAD_URL | tar jx | ||
|
||
ENV FIREFOX_BIN=/application/firefox/firefox | ||
|
||
COPY . /app | ||
|
||
CMD ["bash"] |
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.
Oops, something went wrong.