Last active
August 28, 2016 14:28
-
-
Save hossain-khan/9920439e0e1f4889e4b071460498d7eb to your computer and use it in GitHub Desktop.
Travis-CI build config file used for validating OpenAPI specification file. This file is taken from https://github.com/amardeshbd/medium-api-specification and **modified** for embedding on web, see github project for details.
This file contains hidden or 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
language: bash | |
before_script: | |
# Load the shUnit2 for running shell-script unit test | |
- curl -L "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz" | tar zx | |
script: | |
# Get proper branch name based on http://graysonkoonce.com/getting-the-current-branch-name-during-a-pull-request-in-travis-ci/ | |
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST | |
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi) | |
# All variables ready - run the test script | |
- bash api-spec_validation_test.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment