-
Notifications
You must be signed in to change notification settings - Fork 27
38 lines (30 loc) · 934 Bytes
/
test.yml
File metadata and controls
38 lines (30 loc) · 934 Bytes
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
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-latest
name: Go ${{ matrix.go }} Tests
steps:
- name: Checkout
uses: actions/checkout@v4
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@v5
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/verify-changed-files@v20
id: verify-changed-files
with:
files: README.md