Skip to content

v1.0.0: Local caching, async event worker, initialization options #22

v1.0.0: Local caching, async event worker, initialization options

v1.0.0: Local caching, async event worker, initialization options #22

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@v4
with:
go-version: '1.21'
- 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@v4
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m
version: v1.54
check-mocks:
name: Check Mocks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- 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 mocks are up to date
if: failure()
run: |
echo "::error ::Mocks are out of date. Please update them with `go generate ./...` and commit the changes."
exit 1