0
0
Fork 0
matrix-doc/scripts/test-and-build.sh

35 lines
876 B
Bash
Raw Permalink Normal View History

2017-11-14 13:12:38 +00:00
#! /bin/bash
set -ex
cd `dirname $0`/..
virtualenv -p python3 env
2017-11-14 13:12:38 +00:00
. env/bin/activate
# Print out the python versions for debugging purposes
python --version
pip --version
2017-11-14 13:12:38 +00:00
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/fsnotify.v1
2017-11-14 13:12:38 +00:00
# make sure that the scripts build
(cd scripts/continuserv && go build)
(cd scripts/speculator && go build)
# build the spec for matrix.org.
# (we don't actually use it on travis, but it's still useful to check we
# can build it. On Buildkite, this is then used to deploy to matrix.org).
2017-11-14 13:12:38 +00:00
./scripts/generate-matrix-org-assets