Scripts and utilities that run appleseed's functional test suite on Digital Ocean.
We use a dedicated server on Digital Ocean to run the appleseed test suite on each master build. Travis jobs take care of uploading the Linux build to our server.
We deploy master builds on a dedicated server. We then use these builds to run the test suite.
We first need to add a specific user for deployment on the server:
sudo user add johnny
sudo passwd johnny
sudo mkdir -p /home/johnny
sudo chown -R johny:johnny/home/johnny
sudo usermod --shell /bin/bash johnny
The chosen password for johnny will be configured in Travis. Be sure to choose a safe password and never give sudo permissions to johnny.
Travis needs to know where to deploy and which user/password to use for ssh
. Define the following variables in appleseed Travis settings:
DEPLOY_FOLDER
, where to deploy on the server.last_master_build/
will deploy in/home/johnny/last_master_build/
DEPLOY_PASSWORD
, johnny passwordDEPLOY_URL
, server name, IP address, or whatever we need to ssh to itDEPLOY_USER
, simplyjohnny
DEPLOY_SSS_KEY
, public key of the server
To obtain the public key of the server, run the following:
ssh-keyscan SERVER_IP && ssh-keygen -F SERVER_IP
For more details, see deploy
in .travis.yml
.
First, install some dependencies:
apt-get install python-pip
pip install colorama
Then, fetch the required scripts.
cd /home/johnny
git clone git@github.com:appleseedhq/automated-test-suite.git
To automatically run these tests for new builds, we use cron
to run this script every 24 hours. The crontab
needs to be edited with a sudo user:
$ sudo crontab -u johnny -e
# m h dom mon dow command
0 0 * * * sh /home/johnny/atuomated-test-suite/run_tests.sh
We use a Docker container with nginx:alpine
. First, prepare the www directory:
$ mkdir -p /home/johnny/automated-test-suite-www
Then as root
or any user with docker rights, run the following:
sh /home/johnny/automated-test-suite/start_test_scenes_web_server.sh