-
Notifications
You must be signed in to change notification settings - Fork 28
40 lines (35 loc) · 1.12 KB
/
build.yaml
File metadata and controls
40 lines (35 loc) · 1.12 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
#
# OCI Native Ingress Controller
#
# Copyright (c) 2023 Oracle America, Inc. and its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
#
name: Unit Tests
on:
pull_request: { }
push: { }
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.23.7
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: build the binary
run: |
go build -mod vendor -a -o dist/onic ./main.go
- name: Run Unit Tests
run: |
go test -covermode=count -coverprofile=profile.cov.tmp $(go list ./pkg/... | grep -v /server)
cat profile.cov.tmp | grep -v /pkg/util/testutil.go | grep -v /pkg/oci/client | grep -v /pkg/metric > profile.cov
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=profile.cov -service=github