-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (43 loc) · 943 Bytes
/
test.yaml
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
48
49
name: Go Test
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- .github/workflows/main.yaml
- .github/workflows/gen_coverage.yaml
- assets
- Makefile
pull_request:
types:
- opened
- reopened
- review_requested
branches:
- main
paths-ignore:
- 'README.md'
- .github/workflows/main.yaml
- .github/workflows/gen_coverage.yaml
- assets
- Makefile
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.0
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v ./...
- name: Check code style
run: gofmt -l -s $(find . -type f -name '*.go' -not -path "./vendor/*")