-
Notifications
You must be signed in to change notification settings - Fork 22
47 lines (37 loc) · 868 Bytes
/
unit.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
37
38
39
40
41
42
43
44
45
46
47
name: unit tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
mod:
runs-on: ubuntu-latest
name: Check modules
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Checkout
uses: actions/checkout@v3
- name: Check mod file is updated
run: go mod tidy && git diff --exit-code go.mod go.sum
test:
runs-on: ubuntu-latest
name: Run unit tests
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Checkout
uses: actions/checkout@v3
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo
- name: Run vet
run: go vet ./...
- name: Run unit tests
run: ginkgo -p -r --race --randomize-all --randomize-suites .