dfb91781aa
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m10s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 8m23s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 6m21s
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
40 lines
1011 B
YAML
40 lines
1011 B
YAML
# Example: Required validation (standalone)
|
|
# A custom validation that checks test coverage meets a threshold.
|
|
|
|
name: qa/coverage-check
|
|
description: Verify test coverage meets the required threshold
|
|
source: custom
|
|
mode: required
|
|
code: |
|
|
import json
|
|
report = json.loads(inputs["coverage_json"])
|
|
total = report.get("totals", {}).get("percent_covered", 0)
|
|
passed = total >= inputs.get("threshold", 80)
|
|
return {
|
|
"passed": passed,
|
|
"data": {"coverage_percent": total},
|
|
"message": f"Coverage {total}% {'meets' if passed else 'below'} threshold"
|
|
}
|
|
|
|
input_schema:
|
|
type: object
|
|
required:
|
|
- coverage_json
|
|
properties:
|
|
coverage_json:
|
|
type: string
|
|
description: JSON string of the coverage report
|
|
threshold:
|
|
type: number
|
|
description: Minimum coverage percentage required
|
|
default: 80
|
|
|
|
resource_slots:
|
|
- name: project_repo
|
|
resource_type: git-checkout
|
|
access: read_only
|
|
description: Repository under test
|
|
binding: contextual
|
|
|
|
timeout: 120
|