You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
792 B
30 lines
792 B
#!/bin/bash
|
|
|
|
if ! [ -f /.dockerenv ] && ! grep -q 'devices:/docker' /proc/1/cgroup ; then
|
|
echo "Not running inside docker, exiting to avoid data damage." >&2
|
|
exit 1
|
|
fi
|
|
|
|
set -e
|
|
set -u
|
|
|
|
echo "### Starting display server"
|
|
Xvfb -ac :0 -screen 0 1280x1024x16 &
|
|
trap 'killall -9 Xvfb' EXIT
|
|
|
|
echo "### Copying and moving files"
|
|
cp -Rf . /tmp/code
|
|
ln -s /tmp/node_modules /tmp/code/node_modules
|
|
cd /tmp/code/
|
|
|
|
echo "################################################################################"
|
|
echo "Finished main setup, now running tests ..."
|
|
|
|
npm test
|
|
|
|
echo "### Moving JUnit XML files to /results"
|
|
mv /tmp/code/t/*.xml /results
|
|
|
|
echo "Finished test execution, test execution returned with exit code."
|
|
echo "################################################################################"
|