2020-12-07 12:26:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-12-09 12:15:38 +01:00
|
|
|
# check author has added themselves to CONTRIBUTORS
|
2020-12-16 02:59:07 +01:00
|
|
|
echo "--- Checking CONTRIBUTORS"
|
2020-12-09 12:15:38 +01:00
|
|
|
.buildkite/linux/check_contributors
|
|
|
|
|
2020-12-07 12:26:52 +01:00
|
|
|
BAZEL="bazel --output_user_root=/state/bazel --output_base=/state/bazel/anki"
|
2022-01-23 09:47:39 +01:00
|
|
|
BUILDARGS="--config=ci --disk_cache=/state/bazel/disk --repository_cache=/state/bazel/repo"
|
2020-12-07 12:26:52 +01:00
|
|
|
|
2021-12-09 09:55:19 +01:00
|
|
|
echo "+++ Building and testing"
|
|
|
|
|
2020-12-07 12:26:52 +01:00
|
|
|
# move existing node_modules into tree
|
2021-10-07 03:34:00 +02:00
|
|
|
test -e /state/node_modules && mv /state/node_modules .
|
2020-12-07 12:26:52 +01:00
|
|
|
|
2021-12-20 08:41:13 +01:00
|
|
|
$BAZEL test $BUILDARGS ... //rslib/linkchecker
|
2020-12-07 12:26:52 +01:00
|
|
|
|
2021-04-13 15:08:57 +02:00
|
|
|
echo "--- Running lints"
|
|
|
|
python scripts/copyright_headers.py
|
|
|
|
|
2020-12-16 02:59:07 +01:00
|
|
|
echo "--- Cleanup"
|
2020-12-07 12:26:52 +01:00
|
|
|
# if tests succeed, back up node_modules folder
|
2021-10-07 03:34:00 +02:00
|
|
|
mv node_modules /state/
|