-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (30 loc) · 862 Bytes
/
ci.yml
File metadata and controls
38 lines (30 loc) · 862 Bytes
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
name: main integration build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5.5.0
with:
go-version: '1.25.4'
- name: Build
run: go build -v ./...
- name: Test
run: go test ./... -coverpkg "$(go list || go list -m | head -1)/..." -coverprofile coverage-raw.out -p 1
- name: Clean coverage
run: cat coverage-raw.out | grep -vE 'mock|test|generate/main.go|prd.go|file.go' > coverage.out
- name: Update coverage report
uses: ncruces/go-coverage-report@v0.3.1
with:
coverage-file: coverage.out
report: true
chart: true
amend: true
if: github.event_name == 'push'
continue-on-error: true