-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 979 Bytes
/
build.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
38
39
40
name: Build
on:
push:
tags:
- v*
branches:
- main
pull_request: {}
schedule:
- cron: "0 2 * * 1"
permissions:
contents: read
jobs:
build:
name: Build
strategy:
matrix:
operating-system:
- ubuntu-latest
go-version:
- "1.18.5"
- "1.19"
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build ./...
- name: Test
run: go test ./tests/... -covermode=atomic -coverpkg ./... -coverprofile=coverage.out
- name: Convert coverage data to lcov
uses: jandelgado/gcov2lcov-action@v1
- name: Publish coverage data
uses: coverallsapp/github-action@master
with:
path-to-lcov: coverage.lcov
github-token: ${{ secrets.github_token }}