-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 980 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: build
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true
- name: Install Task
run: go install github.com/go-task/task/v3/cmd/task@latest
- name: Install mockgen
run: go install github.com/golang/mock/mockgen@latest
- name: Generate mocks
run: go generate ./pkg/... ./internal/...
- name: Run Unit tests
run: go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: covprofile
force-coverage-parser: go