Skip to content

readme and github action improvements #38

readme and github action improvements

readme and github action improvements #38

Workflow file for this run

name: Test
on:
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Run tests
run: go test ./...
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m
version: v1.54
check-generate:
name: Check Generated Code
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install mockgen
run: go install go.uber.org/mock/mockgen@latest
- name: Set PATH
run: echo "$PATH:$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Generate mocks
run: |
go generate ./...
git diff --exit-code
- name: Confirm generated code is up to date
if: failure()
run: |
echo "::error ::Generated code (mocks or OpenAPI) are out of date. Please update them with `go generate ./...` and commit the changes."
exit 1