forked from splunk/splunk-javascript-logging
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Travis CI config, make tests compatible with CI
- Loading branch information
Shakeel Mohamed
committed
Feb 15, 2018
1 parent
94ded47
commit cf3a223
Showing
4 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
coverage | ||
node_modules | ||
npm-debug.log | ||
config.json | ||
test/config.json | ||
.idea | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
notifications: | ||
email: false | ||
|
||
before_install: | ||
# Create .splunkrc file with default credentials | ||
- echo host=localhost >> $HOME/.splunkrc | ||
- echo username=admin >> $HOME/.splunkrc | ||
- echo password=changeme >> $HOME/.splunkrc | ||
# Set SPLUNK_HOME | ||
- export SPLUNK_HOME="/opt/splunk" | ||
# Pull docker image | ||
- docker pull splunk/splunk-sdk-travis-ci:$SPLUNK_VERSION | ||
# Add DOCKER to iptables, 1/10 times this is needed, force 0 exit status | ||
- sudo iptables -N DOCKER || true | ||
# Start Docker container | ||
- docker run -p 127.0.0.1:8089:8089 -p 127.0.0.1:8088:8088 -d splunk/splunk-sdk-travis-ci:$SPLUNK_VERSION | ||
# curl Splunk until it returns valid data indicating it has been setup, try 20 times maximum | ||
- for i in `seq 0 20`; do if curl --fail -k https://localhost:8089/services/server/info &> /dev/null; then break; fi; echo $i; sleep 1; done | ||
|
||
|
||
language: node_js | ||
node_js: | ||
- "5.0" | ||
- "4.2" | ||
- "0.12" | ||
- "0.10" | ||
|
||
#Splunk versions can be set here | ||
env: | ||
- SPLUNK_VERSION=6.6-sdk | ||
- SPLUNK_VERSION=7.0-sdk | ||
|
||
# Test script, should return non 0 exit status if a test fails | ||
script: | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters