mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 19:33:09 -06:00
First attempt at fixing CI
This commit is contained in:
parent
2524df8c33
commit
ce3d6e1b53
|
|
@ -1,7 +1,7 @@
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.10.x
|
|
||||||
- 1.11.x
|
- 1.11.x
|
||||||
|
- 1.12.x
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- TEST_SUITE="lint"
|
- TEST_SUITE="lint"
|
||||||
|
|
@ -23,9 +23,6 @@ cache:
|
||||||
directories:
|
directories:
|
||||||
- .downloads
|
- .downloads
|
||||||
|
|
||||||
install:
|
|
||||||
- go get github.com/constabulary/gb/...
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./scripts/travis-test.sh
|
- ./scripts/travis-test.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,16 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
export GOPATH="$(pwd):$(pwd)/vendor"
|
|
||||||
export PATH="$PATH:$(pwd)/bin"
|
|
||||||
|
|
||||||
echo "Checking that it builds"
|
echo "Checking that it builds"
|
||||||
gb build
|
gb build
|
||||||
|
|
||||||
# Check that all the packages can build.
|
# Check that all the packages can build.
|
||||||
# When `go build` is given multiple packages it won't output anything, and just
|
# When `go build` is given multiple packages it won't output anything, and just
|
||||||
# checks that everything builds. This seems to do a better job of handling
|
# checks that everything builds.
|
||||||
# missing imports than `gb build` does.
|
|
||||||
echo "Double checking it builds..."
|
echo "Double checking it builds..."
|
||||||
go build github.com/matrix-org/dendrite/cmd/...
|
go build ./cmd/...
|
||||||
|
|
||||||
./scripts/find-lint.sh
|
./scripts/find-lint.sh
|
||||||
|
|
||||||
echo "Testing..."
|
echo "Testing..."
|
||||||
gb test
|
go test ./...
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ then args="$args --enable-gc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing lint search engine..."
|
echo "Installing lint search engine..."
|
||||||
gb build github.com/alecthomas/gometalinter/
|
go get github.com/alecthomas/gometalinter/
|
||||||
gometalinter --config=linter.json ./... --install
|
gometalinter --config=linter.json ./... --install
|
||||||
|
|
||||||
echo "Looking for lint..."
|
echo "Looking for lint..."
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# Downloads, installs and runs a kafka instance
|
# Downloads, installs and runs a kafka instance
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ set -eu
|
||||||
export GOGC=400
|
export GOGC=400
|
||||||
export DENDRITE_LINT_DISABLE_GC=1
|
export DENDRITE_LINT_DISABLE_GC=1
|
||||||
|
|
||||||
export GOPATH="$(pwd):$(pwd)/vendor"
|
export GO111MODULE=on
|
||||||
export PATH="$PATH:$(pwd)/bin"
|
|
||||||
|
|
||||||
# starts a travis fold section. The first argument is the name of the fold
|
# starts a travis fold section. The first argument is the name of the fold
|
||||||
# section (which appears on the RHS) and may contain no spaces. Remaining
|
# section (which appears on the RHS) and may contain no spaces. Remaining
|
||||||
|
|
@ -55,25 +54,14 @@ if [ "${TEST_SUITE:-unit-test}" == "unit-test" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then
|
if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then
|
||||||
travis_start gb-build "Building dendrite and integ tests"
|
travis_start go-build "Building dendrite and integ tests"
|
||||||
gb build
|
go install ./cmd/...
|
||||||
travis_end
|
travis_end
|
||||||
|
|
||||||
# Check that all the packages can build.
|
# Check that all the packages can build.
|
||||||
# When `go build` is given multiple packages it won't output anything, and just
|
# When `go build` is given multiple packages it won't output anything, and just
|
||||||
# checks that everything builds. This seems to do a better job of handling
|
# checks that everything builds.
|
||||||
# missing imports than `gb build` does.
|
go build ./cmd/...
|
||||||
go build github.com/matrix-org/dendrite/cmd/...
|
|
||||||
|
|
||||||
# Check that the servers build (this is done explicitly because `gb build` can silently fail (exit 0) and then we'd test a stale binary)
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/dendrite-room-server
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/roomserver-integration-tests
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/dendrite-sync-api-server
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/syncserver-integration-tests
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/create-account
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/dendrite-media-api-server
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/mediaapi-integration-tests
|
|
||||||
gb build github.com/matrix-org/dendrite/cmd/client-api-proxy
|
|
||||||
|
|
||||||
# Create necessary certificates and keys to run dendrite
|
# Create necessary certificates and keys to run dendrite
|
||||||
travis_start certs "Building SSL certs"
|
travis_start certs "Building SSL certs"
|
||||||
|
|
@ -92,7 +80,7 @@ if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then
|
||||||
# Run the integration tests
|
# Run the integration tests
|
||||||
for i in roomserver syncserver mediaapi; do
|
for i in roomserver syncserver mediaapi; do
|
||||||
travis_start "$i-integration-tests" "Running integration tests for $i"
|
travis_start "$i-integration-tests" "Running integration tests for $i"
|
||||||
bin/$i-integration-tests
|
$i-integration-tests
|
||||||
travis_end
|
travis_end
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue