Skip to content

chore: update libs #140

chore: update libs

chore: update libs #140

Workflow file for this run

name: main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
services:
emulator:
image: gcr.io/cloud-spanner-emulator/emulator
ports:
- 9010:9010
- 9020:9020
steps:
- name: Setup golang 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
- name: Checkout code
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test using emulator
run: |
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-400.0.0-linux-x86_64.tar.gz
tar xvzf google-cloud-sdk-400.0.0-linux-x86_64.tar.gz
./google-cloud-sdk/install.sh --quiet
gcloud config configurations create emulator
gcloud config set auth/disable_credentials true
gcloud config set project test-project
gcloud config set api_endpoint_overrides/spanner http://localhost:9020/
gcloud spanner instances create test-instance --config=emulator-config --description="Test Instance" --nodes=1
export SPANNER_EMULATOR_HOST=localhost:9010
gcloud spanner databases create testdb --instance=test-instance --ddl-file=$PWD/testdata/emuddl.sql
go test -v ./...