Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%

flags:
unit:
paths:
- "!test/e2e/"
- "!examples/openshift/tests/e2e/"
e2e-kustomize:
paths:
- "!test/e2e/"

comment:
layout: "reach,diff,flags,files"
behavior: default

31 changes: 31 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Codecov Coverage

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
upload-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod

- name: Run unit tests
run: make unit-test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
files: cover.out
flags: unit
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/kustomize-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ jobs:
env:
SPARK_OPERATOR_IMAGE: ghcr.io/kubeflow/spark-operator/controller:local

- name: Upload e2e coverage to Codecov
if: always()
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
files: cover-e2e-kustomize.out
flags: e2e-kustomize
token: ${{ secrets.CODECOV_TOKEN }}

- name: Debug - Show cluster state
if: failure()
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.idea/
.vscode/
bin/
codecov.yaml
cover.out
cover.html
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion examples/openshift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ test-docling-spark: ## Run Docling Spark test on KIND or OpenShift.
.PHONY: e2e-kustomize-test
e2e-kustomize-test: ## Run Go e2e tests using Kustomize manifests for operator installation.
@echo "Running Go e2e tests with Kustomize installation..."
cd $(REPO_ROOT) && INSTALL_METHOD=kustomize go test ./examples/openshift/tests/e2e/ -v -ginkgo.v -timeout 30m
cd $(REPO_ROOT) && INSTALL_METHOD=kustomize go test ./examples/openshift/tests/e2e/ -v -ginkgo.v -timeout 30m -coverprofile cover-e2e-kustomize.out

.PHONY: test-all
test-all: ## Run all tests (operator-install, spark-pi, docling).
Expand Down
Loading