forked from devfile/devworkspace-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.2 KB
/
code-coverage.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
name: Code Coverage Report
on:
push:
branches:
- main
jobs:
coverage-report:
name: Check Code Coverage
runs-on: ubuntu-20.04
steps:
-
name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: 1.20.10
-
name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
-
name: Check out code into the Go module directory
uses: actions/checkout@v3
-
name: Cache go modules
id: cache-mod
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
name: Download dependencies
run: go mod download
if: steps.cache-mod.outputs.cache-hit != 'true'
-
name: Run Go Tests
run: |
python -m pip install --upgrade pip yq
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/[email protected]
make update_devworkspace_crds test
-
name: Build Codecov report
uses: codecov/codecov-action@v3
with:
files: ./cover.out,./controller.cover.out