Skip to content

generate mocks in github actions #23

generate mocks in github actions

generate mocks in github actions #23

Workflow file for this run

on: [push, pull_request]
name: Test
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Download dependencies
run: go mod download
- name: Install mockgen
run: |
go install go.uber.org/mock/mockgen@latest
- name: Generate mocks
run: |
mockgen -source=./internal/server/services/services.go \
-destination=internal/server/services/mock/mock.go -package=mock
- name: Run tests
run: go test -v -race ./...