-
Notifications
You must be signed in to change notification settings - Fork 21
37 lines (29 loc) · 922 Bytes
/
test.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
name: Run Tests
# Triggers the workflow on push or pull request events
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go: ["1.21"]
runs-on: ubuntu-20.04
name: Go ${{ matrix.go }} Tests
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Verify dependencies
run: go mod verify
- name: Run Test
run: go test -v ./... -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: README.md