-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (41 loc) · 1.12 KB
/
ci.yaml
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
46
name: CI
on:
push:
branches:
- main
- development
tags:
- v*
paths-ignore:
- README.md
pull_request:
branches:
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: 1.20.4
- name: Checkout code
uses: actions/checkout@v3
- name: Get dependencies
run: go get -v -t -d ./...
- name: Calc coverage
run: make coverage
- name: Download gcov2lcov
shell: bash
run: 'set -x && curl -sLf "https://github.com/jandelgado/gcov2lcov/releases/latest/download/gcov2lcov-linux-amd64.tar.gz" | tar zxf - --strip 1'
working-directory: /tmp
- name: Convert coverage to lcov
shell: bash
run: '/tmp/gcov2lcov-linux-amd64 -infile "coverage.out" -outfile "coverage.lcov"'
env:
GOROOT: /opt/hostedtoolcache/go/1.20.4/x64
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov