diff options
| author | Julie Qiu <julie@golang.org> | 2021-06-11 16:22:52 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-06-11 20:39:28 +0000 |
| commit | fced913ebf19ff4cb49f7be6154d0b6d740605e5 (patch) | |
| tree | 78cebc9341d95fd22b6f5e3286ab175cf9b7ec14 /devtools | |
| parent | 46d4a94fd57564068abf8269ed717c74504d9774 (diff) | |
| download | go-x-pkgsite-fced913ebf19ff4cb49f7be6154d0b6d740605e5.tar.xz | |
devtools/ci: run all tests in ci.sh
The internal kokoro build.sh currently runs the following:
devtools/ci/ci.sh
devtools/ci/nodejs.sh npm install --quiet
devtools/ci/nodejs.sh npm run lint
devtools/ci/nodejs.sh npm run test
devtools/ci/e2e.sh
Rather than having multiple files referenced in the internal kokoro
file, moving these tests to ci.sh. That way it is more opaque what we
are running in CI, and easier to add/remove files and comment out lines
for testing.
devtools/ci/nodejs.sh will be deleted in a future CL once it has been
removed from the internal build.sh.
Change-Id: I397a5d5cd2efb59da7a771617330f70b980911b0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326970
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'devtools')
| -rwxr-xr-x | devtools/ci/ci.sh | 6 | ||||
| -rwxr-xr-x | devtools/ci/e2e.sh | 12 | ||||
| -rwxr-xr-x | devtools/ci/nodejs.sh | 16 | ||||
| -rwxr-xr-x | devtools/nodejs.sh | 6 |
4 files changed, 16 insertions, 24 deletions
diff --git a/devtools/ci/ci.sh b/devtools/ci/ci.sh index c9296f2b..7c322663 100755 --- a/devtools/ci/ci.sh +++ b/devtools/ci/ci.sh @@ -45,3 +45,9 @@ ${maybe_sudo}docker run --rm -t \ --network container:${pg_container} \ -v $(pwd):"/workspace" -w "/workspace" \ -e GO_DISCOVERY_TESTDB=true golang:1.15 ./all.bash ci + +# Run CSS and JS tests. +echo "Running CSS and JS tests." +./devtools/nodejs.sh npm install --quiet +./devtools/nodejs.sh npm run lint +./devtools/nodejs.sh npm run test diff --git a/devtools/ci/e2e.sh b/devtools/ci/e2e.sh index 4f1c62b8..9eab810a 100755 --- a/devtools/ci/e2e.sh +++ b/devtools/ci/e2e.sh @@ -1,16 +1,10 @@ #!/usr/bin/env bash + # Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e -usage() { - cat <<EOUSAGE -Usage: - -This is a placeholder file for running e2e tests in CI. -EOUSAGE -} - -usage +# TODO: delete this file once it is removed internally. +echo "Skipping e2e.sh call from kokoro build.sh. This is run in ci.sh." diff --git a/devtools/ci/nodejs.sh b/devtools/ci/nodejs.sh index f416831d..26a1d96f 100755 --- a/devtools/ci/nodejs.sh +++ b/devtools/ci/nodejs.sh @@ -1,20 +1,10 @@ #!/usr/bin/env bash -# Copyright 2020 The Go Authors. All rights reserved. +# Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e -# Script for running a nodejs docker image. -# It passes env variables for e2e tests, -# mounts the pwd into a volume in the container at /pkgsite, -# and sets the working directory in the container to /pkgsite. - -docker run --net=host --rm -t \ - -e GO_DISCOVERY_E2E_BASE_URL \ - -e GO_DISCOVERY_E2E_AUTHORIZATION \ - -e GO_DISCOVERY_E2E_QUOTA_BYPASS \ - -v `pwd`:/pkgsite \ - -w /pkgsite \ - node:14.17.0 $@ +# TODO: delete this file once it is removed internally. +echo "Skipping nodejs.sh call from kokoro build.sh. This is run in ci.sh." diff --git a/devtools/nodejs.sh b/devtools/nodejs.sh index 3b6a5111..c8ae4dc7 100755 --- a/devtools/nodejs.sh +++ b/devtools/nodejs.sh @@ -1,9 +1,11 @@ -#!/usr/bin/env -S bash -e +#!/usr/bin/env bash -# Copyright 2020 The Go Authors. All rights reserved. +# Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +set -e + # Script for running a nodejs docker image. # It passes env variables for e2e tests, # mounts the pwd into a volume in the container at /pkgsite, |
