-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (36 loc) · 905 Bytes
/
test.yml
File metadata and controls
45 lines (36 loc) · 905 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
39
40
41
42
43
44
45
name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: ./go.mod
check-latest: true
cache: true
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Test
run: go test -race -coverprofile=coverage.out -coverpkg=./... ./...
- name: Generate Coverage Report
run: go tool cover -html=coverage.out -o=coverage.html
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage.html
path: coverage.html
- name: ShellCheck
run: shellcheck scripts/install.sh