-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (58 loc) · 1.89 KB
/
golang_integration_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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Go Integration Test
on:
push:
branches-ignore:
- main
- master
pull_request:
branches:
- main
- master
release:
jobs:
integration-test:
name: integration-test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version-file: './go.mod'
# - name: Download envtest setup script
# run: curl -sSLo setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/master/hack/setup-envtest.sh
# - name: Make the script executable
# run: chmod +x setup-envtest.sh
# - name: Setup envtest
# run: ./setup-envtest.sh
# - name: Install Controller-gen
# run: GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/[email protected]
# - name: Install Kustomize
# run: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
config: test/kind/config.yml
cluster_name: test-cluster
- name: run integration tests
run: make integration-test
- uses: actions/upload-artifact@v3
with:
name: integration_coverage_report
path: integration-test-cover.out
# coverage:
# name: Coverage report
# runs-on: ubuntu-latest
# needs: integration-test
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: integration_coverage_report
# - uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# with:
# files: integration-test-cover.out
# flags: integrationtests
# fail_ci_if_error: true