-
Notifications
You must be signed in to change notification settings - Fork 5
29 lines (27 loc) · 878 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
name: test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: ['>=1.18.0']
os: [ubuntu-latest,]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Unshallow git checkout
run: git fetch --prune --unshallow
- name: Run tests
run: go test -v -covermode=count -coverprofile=coverage.out ./...
- name: Convert coverage to lcov
uses: jandelgado/[email protected]
- name: Report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov