- Install VirtualBox
- Install vagrant
- Install Ansible
- Clone repository:
git clone [email protected]:sawyer-effect/tdd-js.git
- Go to project dir:
cd tdd-js
- Execute command
vagrant up
To run tests you can run the following commads:
vagrant ssh -c "grunt --gruntfile /opt/software/tdd-js/Gruntfile.js test"
vagrant ssh -c "gulp --gulpfile /opt/software/tdd-js/Gulpfile.js test"
- Goto http://192.168.33.10:8080/jenkins/
- Add a new freestyle job that runs this shell scripts:
cd /opt/software/tdd-js
./node_modules/.bin/karma start --single-run --browsers PhantomJS
curl http://[HOST]/on/demandware.store/Sites-[SITE_NAME]-Site/default/Tester-Run\?suite\=[SUITE_NAME]\&cartridge\=[CARTRIDGE_NAME]\&testid\=-1 | if [ `jq '.passed'` != "false" ] ; then exit 1 ; else exit 0 ; fi