Go #1226
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: 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@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.18" | |
- name: Run Go generators | |
run: go generate ./.../gen | |
- name: Build Go | |
run: go build ./... | |
- name: Install gotestsum | |
run: go install gotest.tools/gotestsum@latest | |
- name: Run Go tests | |
run: gotestsum | |
client-scan: | |
if: github.event_name != 'schedule' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: securego/gosec@master | |
with: | |
args: ./... | |
client-lint: | |
if: github.event_name != 'schedule' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Lint Go | |
uses: keep-network/[email protected] |