-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.21 KB
/
go.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
41
42
43
44
45
name: Go Test
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v4
with:
go-version: ^1.20.2
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libunwind-dev libgstreamer1.0-dev libgtk-4-dev libsystemd-dev libgstreamer-plugins-base1.0-dev
version: 0.0.0.3
- run: go install github.com/abice/go-enum@latest
- run: go install github.com/jstemmer/go-junit-report/v2@latest
- name: Generate
run: go generate -v ./...
- name: Build
run: go build -v ./...
- name: Test
run: |
go test -coverprofile=coverage.txt -covermode=atomic -json -v ./... | \
go-junit-report -parser gojson -set-exit-code > report.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
- name: Test Summary
uses: test-summary/action@v2
with:
paths: report.xml
if: always()