Skip to content

Commit

Permalink
Install bats only during test execution (#46)
Browse files Browse the repository at this point in the history
* Install bats only during test execution

* Install bats and bats-mock via npm
  • Loading branch information
andrcuns authored and SrinivasanTarget committed Jun 8, 2017
1 parent 6eb157e commit 9893a91
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ before_install:

script:
- docker build -t "appium/appium:latest" -f Appium/Dockerfile .
- docker run --rm "appium/appium:latest" bats tests
- docker run --rm -v $PWD/Appium/tests:/root/tests "appium/appium:latest" bash tests/run-bats.sh

after_success:
- if [[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ "$TRAVIS_TAG" != "" ]]; then
Expand Down
8 changes: 0 additions & 8 deletions Appium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ WORKDIR /root
# Network downloader
# libqt5webkit5
# Web content engine (Fix issue in Android)
# bats
# Testing framework for Bash
# libgconf-2-4
# Required package for chrome and chromedriver to run on Linux
# xvfb
Expand All @@ -42,7 +40,6 @@ RUN apt-get -qqy update && \
curl \
wget \
libqt5webkit5 \
bats \
libgconf-2-4 \
xvfb \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -99,11 +96,6 @@ RUN echo "${TZ}" > /etc/timezone
#===============
EXPOSE 4723

#====================
# Add Unit test file
#====================
COPY Appium/tests /root/tests

#====================================================
# Scripts to run appium and connect to Selenium Grid
#====================================================
Expand Down
2 changes: 1 addition & 1 deletion Appium/tests/grid.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

load helpers/mocks/stub
load ../node_modules/bats-mock/stub

default_node_config=\
'{
Expand Down
1 change: 0 additions & 1 deletion Appium/tests/helpers/mocks
Submodule mocks deleted from db2ac2
9 changes: 9 additions & 0 deletions Appium/tests/run-bats.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

#Install bats
echo "Installing Bats before test execution"
npm install [email protected]
npm install [email protected]

#Run tests
./node_modules/.bin/bats /root/tests/*.bats

0 comments on commit 9893a91

Please sign in to comment.