v1.0.0: Local caching, async event worker, initialization options #17
Workflow file for this run
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: 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:/home/runner/go/bin" >> $GITHUB_PATH | |
mockgen --version | |
- name: Generate mocks | |
run: | | |
go generate ./... | |
git diff --exit-code | |
- name: Check for changes | |
if: failure() | |
run: | | |
echo "::error ::Mocks are out of date. Please update them and commit the changes." | |
exit 1 |