You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
1.2 KiB

  1. #!/bin/bash
  2. # Fail on any error
  3. set -eo pipefail
  4. # Display commands being run
  5. set -x
  6. # cd to project dir on Kokoro instance
  7. cd git/gocloud
  8. go version
  9. # Set $GOPATH
  10. export GOPATH="$HOME/go"
  11. GOCLOUD_HOME=$GOPATH/src/cloud.google.com/go
  12. mkdir -p $GOCLOUD_HOME
  13. # Move code into $GOPATH and get dependencies
  14. cp -R ./* $GOCLOUD_HOME
  15. cd $GOCLOUD_HOME
  16. go get -v ./...
  17. # # Don't run integration tests until we can protect against code from
  18. # # untrusted forks reading and storing our service account key.
  19. # cd internal/kokoro
  20. # # Don't print out encryption keys, etc
  21. # set +x
  22. # key=$(cat $KOKORO_ARTIFACTS_DIR/keystore/*_encrypted_ba2d6f7723ed_key)
  23. # iv=$(cat $KOKORO_ARTIFACTS_DIR/keystore/*_encrypted_ba2d6f7723ed_iv)
  24. # pass=$(cat $KOKORO_ARTIFACTS_DIR/keystore/*_encrypted_ba2d6f7723ed_pass)
  25. # openssl aes-256-cbc -K $key -iv $iv -pass pass:$pass -in kokoro-key.json.enc -out key.json -d
  26. # set -x
  27. # export GCLOUD_TESTS_GOLANG_KEY="$(pwd)/key.json"
  28. # export GCLOUD_TESTS_GOLANG_PROJECT_ID="dulcet-port-762"
  29. # cd $GOCLOUD_HOME
  30. # Run tests and tee output to log file, to be pushed to GCS as artifact.
  31. go test -race -v -short ./... 2>&1 | tee $KOKORO_ARTIFACTS_DIR/$KOKORO_GERRIT_CHANGE_NUMBER.txt
  32. # Make sure README.md is up to date.
  33. make -C internal/readme test diff