Skip to content

Commit 957c71f

Browse files
committed
fix(ci): Record and upload test coverage for watcher
1 parent c52c9dc commit 957c71f

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/watcher.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,12 @@ jobs:
3535
version: v1.60
3636
args: --timeout=5m
3737
working-directory: watcher
38-
- name: Run tests
39-
run: go test -v ./...
38+
- name: Run tests with coverage
39+
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
40+
- name: Upload results to Codecov
41+
uses: codecov/codecov-action@v4
42+
with:
43+
token: ${{ secrets.CODECOV_TOKEN }}
44+
files: ./watcher/coverage.txt
45+
slug: aai-institute/infrastructure-product
46+
flags: watcher

codecov.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ignore:
22
- "test_*.py"
33
- "**/tests/**"
4+
- "*_test.go"
45
coverage:
56
status:
67
project: off
@@ -15,3 +16,7 @@ flag_management:
1516
paths:
1617
- "backend/"
1718
carryforward: true
19+
- name: watcher
20+
paths:
21+
- "watcher/"
22+
carryforward: true

watcher/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ watcher
33

44
# Helm chart directory
55
!deploy/**
6+
7+
# Test coverage
8+
coverage.txt

0 commit comments

Comments
 (0)