-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (28 loc) · 741 Bytes
/
test.yml
File metadata and controls
29 lines (28 loc) · 741 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
name: test
on:
push:
paths:
- "**.go"
permissions:
contents: write
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: run tests
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
- name: generate coverage badge
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
local-prefix: github.com/gkits/sqlnull
threshold-total: 80
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
git-branch: badges