Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Codecov configuration
# Reference: https://docs.codecov.com/docs/codecov-yaml

coverage:
precision: 1
round: down
range: "50...90"
status:
project:
default:
target: auto
threshold: 2%
patch:
default:
target: auto
threshold: 2%

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: false

ignore:
- "cmd/**/*" # CLI entry points (serve, migrate, user, reindex CLI flags)
- "deploy/**/*" # Ansible deployment playbooks & templates
- "web/**/*" # React frontend (tested independently)
- "test/**/*" # Integration test helpers
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
env:
DB_DSN: "selfcloud:selfcloud_pass@tcp(127.0.0.1:3306)/selfcloud?parseTime=true"
run: |
go test -v -race -coverprofile=coverage.out ./...
go test -v -race -coverpkg=./internal/... -coverprofile=coverage.out ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test:
$(ENV_PATH) go test -v ./...

test-coverage:
$(ENV_PATH) go test -coverprofile=coverage.out ./...
$(ENV_PATH) go test -coverpkg=./internal/... -coverprofile=coverage.out ./...
$(ENV_PATH) go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html"
@open coverage.html
Expand Down
Loading