Skip to content

Go

Go #43

Workflow file for this run

name: Go
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
client-build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.22"
cache: true
- name: Run Go generators
run: go generate ./.../gen
- name: Ensure generated code is clean
run: git diff --exit-code
- name: Run Go vet
run: go vet ./...
- name: Build Go
run: go build ./...
- name: Install gotestsum
run: go install gotest.tools/[email protected]
- name: Run Go tests
run: gotestsum
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/[email protected]
- name: Run govulncheck
run: govulncheck ./...
continue-on-error: true
client-scan:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: securego/[email protected]
with:
args: ./...
client-lint:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.22"
cache: true
- name: Run Go generators
run: go generate ./.../gen
- name: Install golint
run: go install golang.org/x/lint/golint@latest
- name: Run golint
run: golint ./...