chore(deps): update deps #3974
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Generator tests | |
on: | |
push: | |
branches: | |
- main | |
- diregapic-dev-branch | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: Check formatting | |
run: gofmt -l ./ > gofmt.txt && ! [ -s gofmt.txt ] | |
- name: Install golint | |
run: go install golang.org/x/lint/golint@latest | |
if: ${{ always() }} | |
- name: Lint | |
# Exclude all of the grpc_service_config package (it is generated). | |
run: golint -set_exit_status $(go list ./... | grep -v 'grpc_service_config') > golint.txt | |
if: ${{ always() }} | |
- name: Vet | |
# The mod download is there to prevent go vet from logging mod downloads | |
# which would mess up the empty vetting results check. | |
# Exclude all of the grpc_service_config package (it is generated). | |
run: go mod download && go vet $(go list ./... | grep -v 'grpc_service_config') > govet.txt && ! [ -s govet.txt ] | |
if: ${{ always() }} | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: linting-results | |
path: | | |
gofmt.txt | |
golint.txt | |
govet.txt | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- run: go test ./... | |
integration-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: Install protoc | |
run: | | |
sudo mkdir -p /usr/src/protoc/ | |
sudo chown -R ${USER} /usr/src/ | |
curl --location https://github.com/google/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip --output /usr/src/protoc/protoc-3.17.3.zip | |
cd /usr/src/protoc/ | |
unzip protoc-3.17.3.zip | |
sudo ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc | |
- name: Install tools and dependencies | |
run: | | |
go install golang.org/x/exp/cmd/apidiff@latest | |
go install github.com/golang/protobuf/protoc-gen-go@latest | |
curl -sSL https://github.com/googleapis/googleapis/archive/master.zip > googleapis.zip | |
unzip googleapis.zip -x "googleapis-master/google/ads/*" | |
mv googleapis-master /tmp/googleapis | |
- name: Create Go package API baseline | |
if: "!contains(github.event.pull_request.labels.*.name, 'breaking change allowed')" | |
run: | | |
cd showcase | |
apidiff -w pkg.latest github.com/googleapis/gapic-showcase/client | |
- name: Run integration tests | |
run: | | |
export PATH=$PATH:protobuf/bin | |
export GOOGLEAPIS=/tmp/googleapis | |
make test | |
- name: Compare regenerated code to baseline | |
if: "!contains(github.event.pull_request.labels.*.name, 'breaking change allowed')" | |
run: | | |
cd showcase | |
apidiff -incompatible pkg.latest github.com/googleapis/gapic-showcase/client > diff.txt && cat diff.txt && ! [ -s diff.txt ] | |
bazel-build: | |
runs-on: ubuntu-latest | |
env: | |
USE_BAZEL_VERSION: 6.0.0 | |
container: gcr.io/gapic-images/googleapis:latest | |
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run bazel build | |
run: bazelisk build '//...' | |
- name: Run bazel test | |
run: bazelisk test '//...' |