aboutsummaryrefslogtreecommitdiff
path: root/build/scripts/build-test-lint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/scripts/build-test-lint.sh')
-rwxr-xr-xbuild/scripts/build-test-lint.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/build/scripts/build-test-lint.sh b/build/scripts/build-test-lint.sh
new file mode 100755
index 00000000..d2b2b4b1
--- /dev/null
+++ b/build/scripts/build-test-lint.sh
@@ -0,0 +1,16 @@
+#! /bin/bash
+
+# Builds, tests and lints dendrite, and should be run before pushing commits
+
+set -eu
+
+# Check that all the packages can build.
+# When `go build` is given multiple packages it won't output anything, and just
+# checks that everything builds.
+echo "Checking that it builds..."
+go build ./cmd/...
+
+./scripts/find-lint.sh
+
+echo "Testing..."
+go test ./...