From 202a265d853460baaeb6431feb10ac6ea0a20247 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 14 Nov 2017 13:12:38 +0000 Subject: [PATCH] Config for travis-ci --- .travis.yml | 8 ++++++++ scripts/travis.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .travis.yml create mode 100755 scripts/travis.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..26a2f67b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: go +go: + - 1.8 + +sudo: false + +script: + - ./scripts/travis.sh diff --git a/scripts/travis.sh b/scripts/travis.sh new file mode 100755 index 00000000..9fe49856 --- /dev/null +++ b/scripts/travis.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +set -ex + +virtualenv env +. env/bin/activate +pip install -r scripts/requirements.txt + +# do sanity checks on the examples and swagger +(cd event-schemas/ && ./check_examples.py) +(cd api && ./check_examples.py) +(cd api && npm install && node validator.js -s "client-server") + +: ${GOPATH:=${WORKSPACE}/.gopath} +mkdir -p "${GOPATH}" +export GOPATH +go get github.com/hashicorp/golang-lru +go get gopkg.in/fsnotify.v1 + +# make sure that the scripts build +(cd scripts/continuserv && go build) +(cd scripts/speculator && go build) + +# build the spec and collect the supporting docs for matrix.org. (we aren't +# actually going to use them, since we're on travis, but we may as well check +# that the build works correctly). +./scripts/generate-matrix-org-assets