-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (46 loc) · 1.13 KB
/
build-and-test.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
46
name: build-and-test
on:
push:
branches:
- "*"
pull_request:
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
cache: true
go-version: 1.23.5
- name: Check project dependencies
run: |
rm go.sum
go mod tidy
git -c color.ui=always diff --exit-code go.mod go.sum
- name: Test
run: go test -race ./... -v -coverprofile=coverage.out
env:
GOEXPERIMENT: nocoverageredesign
- name: Set up kubectl
uses: azure/setup-kubectl@v4
with:
version: v1.31.0
- name: Generate Install Manifests
run: |
hack/generate-manifests.sh
git -c color.ui=always diff --exit-code deploy/
- name: Upload Coverage Report
uses: codecov/codecov-action@v5
with:
file: ./coverage.out
flags: unittests
name: codecov-umbrella
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}