blob: 5efc93b0f8d5d77b33017336ebdef22c4e55b938 [file] [log] [blame]
# Copyright 2019 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.
# Build gopls, and run the govim integration tests. See for
# instructions on how to use this.
# This bucket must be owned by the GCP project executing the build. If
# you are running this from your own project, override using --substitutions.
_RESULT_BUCKET: 'golang-gopls_integration_tests'
# Build gopls from source, to use with the govim integration tests.
- name: 'golang:1.14'
env: ['GOPROXY=']
dir: 'gopls'
args: ['go', 'build']
# Run the tests. Note that the script in this step does not return the exit
# code from `go test`, but rather saves it for use in the final step after
# uploading artifacts.
- name: '$PROJECT_ID/govim-harness:3'
dir: '/src/govim'
- name: artifacts
path: /artifacts
args: ['/workspace/gopls/integration/govim/']
# The govim tests produce a large number of artifacts; tarball/gzip to reduce
# roundtrips and save space.
- name: 'ubuntu'
- name: artifacts
path: /artifacts
args: ['tar', '-czf', 'artifacts.tar.gz', '/artifacts']
# Upload artifacts to GCS.
- name: ''
args: ['cp', 'artifacts.tar.gz', 'gs://${_RESULT_BUCKET}/govim/${BUILD_ID}/artifacts.tar.gz']
# Exit with the actual exit code of the integration tests.
- name: 'ubuntu'
args: ['bash', '']
# Write build logs to the same bucket as artifacts, so they can be more easily
# shared.
logsBucket: 'gs://${_RESULT_BUCKET}'