-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (80 loc) · 2.54 KB
/
ci.yaml
File metadata and controls
82 lines (80 loc) · 2.54 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
################################################################################
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
# Edit Makefile.maker.yaml instead. #
################################################################################
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
# SPDX-License-Identifier: Apache-2.0
name: CI
"on":
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- '*'
paths-ignore:
- '**.md'
workflow_dispatch: {}
permissions:
contents: read
jobs:
build:
name: Build
runs-on: large_runner_16core_64gb
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
check-latest: true
go-version: 1.26.3
- name: Build all binaries
run: make build-all
code_coverage:
name: Code coverage report
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
needs:
- test
runs-on: large_runner_16core_64gb
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Post coverage report
uses: fgrosse/go-coverage-report@cbeb2ab2e32591d690337146ba02a911cc566f3f # v1.3.0
with:
coverage-artifact-name: code-coverage
coverage-file-name: cover.out
root-package: github.com/cobaltcore-dev/kvm-node-agent
permissions:
actions: read
contents: read
pull-requests: write
test:
name: Test
needs:
- build
runs-on: large_runner_16core_64gb
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
check-latest: true
go-version: 1.26.3
- name: Run tests and generate coverage report
run: make build/cover.out
- name: Archive code coverage results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: code-coverage
path: build/cover.out