mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 15:10:48 +02:00
working docker image which can run the acceptance tests
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
FROM ubuntu
|
||||
|
||||
COPY ./test/acceptance/docker-entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
RUN apt-get update && apt-get upgrade
|
||||
RUN apt-get install build-essential redis-server mongodb-server nodejs npm
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
RUN apt-get install -y build-essential redis-server mongodb-server nodejs npm
|
||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||
RUN npm install -g grunt-cli
|
||||
|
||||
RUN mkdir /document-updater
|
||||
VOLUME /document-updater
|
||||
|
||||
@@ -5,4 +5,11 @@ service mongodb start
|
||||
|
||||
cd /document-updater
|
||||
npm install
|
||||
grunt test:acceptance:docker
|
||||
|
||||
|
||||
source ./test/acceptance/scripts/full-test.sh
|
||||
|
||||
service redis-server stop
|
||||
service mongodb stop
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
echo ">> Starting server..."
|
||||
|
||||
grunt >> /dev/null &
|
||||
_pid="$!"
|
||||
|
||||
echo ">> Server started with pid: $_pid"
|
||||
|
||||
sleep 20
|
||||
|
||||
echo ">> Running acceptance tests..."
|
||||
grunt test:acceptance
|
||||
|
||||
echo ">> Killing server (pid: $_pid)"
|
||||
kill -1 "$_pid"
|
||||
|
||||
echo ">> Done"
|
||||
Reference in New Issue
Block a user