2021-10-29 04:39:57 +02:00
|
|
|
name: Units tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
checks:
|
|
|
|
name: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-09-08 00:14:30 +02:00
|
|
|
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089
|
2021-10-29 04:39:57 +02:00
|
|
|
- name: Setup go
|
2022-12-21 23:32:07 +01:00
|
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
2021-10-29 04:39:57 +02:00
|
|
|
with:
|
2022-09-08 00:14:30 +02:00
|
|
|
go-version: 1.19
|
2023-02-14 01:46:52 +01:00
|
|
|
- uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812
|
2021-10-29 05:27:51 +02:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/go/pkg/mod
|
|
|
|
~/.cache/go-build
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
2021-10-29 04:39:57 +02:00
|
|
|
- name: Run tests
|
|
|
|
run: go test -v -covermode=count -coverprofile=coverage.out
|
|
|
|
- name: Convert coverage to lcov
|
2022-09-08 00:45:43 +02:00
|
|
|
uses: jandelgado/gcov2lcov-action@c680c0f7c7442485f1749eb2a13e54a686e76eb5
|
2021-10-29 04:39:57 +02:00
|
|
|
- name: Coveralls
|
2023-05-13 04:27:20 +02:00
|
|
|
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
|
2021-10-29 04:39:57 +02:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
path-to-lcov: coverage.lcov
|