From 3b3aaf66c23da8ddd22544060868a242723aab43 Mon Sep 17 00:00:00 2001 From: Zachary Belford Date: Wed, 20 Feb 2019 16:37:36 -0800 Subject: [PATCH] fix: add simple example --- TESTING.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/TESTING.md b/TESTING.md index 6eb7c32..864f8bf 100644 --- a/TESTING.md +++ b/TESTING.md @@ -3,3 +3,44 @@ Testing is a project specific concern. That being said, each project may use a jenkins pipeline to setup CI and CD for the project. We use [jenkins-vagrant](https://github.com/etclabscore/jenkins-vagrant) + +Here is an example jenkins file that runs node project tests in each of osx, linux and windows: + +```yaml +pipeline { + agent none + stages { + stage('Run Tests') { + parallel { + stage('test') { + agent { + label 'macos' + } + steps { + sh 'npm install' + sh 'npm test' + } + } + stage('linux') { + agent { + label 'linux' + } + steps { + sh 'npm install' + sh 'npm test' + } + } + stage('windows') { + agent { + label 'windows' + } + steps { + bat 'npm install' + bat 'npm test' + } + } + } + } + } +} +```