2021-10-29 04:39:57 +02:00
|
|
|
name: Units tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
checks:
|
|
|
|
name: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-09-19 01:33:26 +02:00
|
|
|
- uses: actions/checkout@v4.1.7
|
2021-10-29 04:39:57 +02:00
|
|
|
- name: Setup go
|
2024-09-19 01:33:00 +02:00
|
|
|
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
|
2021-10-29 04:39:57 +02:00
|
|
|
with:
|
2022-09-08 00:14:30 +02:00
|
|
|
go-version: 1.19
|
2024-06-27 23:44:10 +02:00
|
|
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
|
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
|
2024-06-27 23:45:01 +02:00
|
|
|
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63
|
2021-10-29 04:39:57 +02:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
path-to-lcov: coverage.lcov
|