APIBot: GO SDK Dev Preview #1457
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: CI | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
jobs: | |
code-health: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807 | |
- name: lint | |
uses: golangci/golangci-lint-action@v6.1.1 | |
with: | |
version: v1.57.1 | |
args: --timeout=10m | |
- name: tests | |
run: make test | |
- name: example-tests | |
run: make test-examples | |
build: | |
needs: code-health # only run if code-health passes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
cache-dependency-path: ./tools/package-lock.json | |
- working-directory: ./tools | |
run: | | |
npm install | |
npm run ci | |
- run: go install golang.org/x/tools/cmd/goimports@v0.21.0 | |
- working-directory: ./tools | |
run: | | |
export PATH=${PATH}:`go env GOPATH`/bin | |
make clean_and_generate | |
- name: Fail when generate introducing diff | |
run: | | |
git diff --exit-code | |