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
26 changes: 5 additions & 21 deletions .github/workflows/cpp-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name != 'pull_request' }}
cache-save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Install lcov (+ bc for threshold check)
run: |
Expand Down Expand Up @@ -172,30 +172,14 @@ jobs:

echo "::notice::Coverage threshold met: ${coverage_percent}% >= ${min_coverage}%"

- name: Upload coverage HTML report
- name: Upload coverage artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v6
with:
name: ${{ format('{0}_cpp_coverage_report{1}', github.event.repository.name, inputs.artifact-name-suffix) }}
path: cpp_coverage/
if-no-files-found: ignore
retention-days: ${{ inputs.retention-days }}

- name: Upload raw LCOV file
if: ${{ always() }}
uses: actions/upload-artifact@v6
with:
name: ${{ format('{0}_cpp_coverage_lcov{1}', github.event.repository.name, inputs.artifact-name-suffix) }}
path: coverage.lcov
if-no-files-found: ignore
retention-days: ${{ inputs.retention-days }}

- name: Upload test logs
if: ${{ always() }}
uses: actions/upload-artifact@v6
with:
name: ${{ format('{0}_cpp_test_logs{1}', github.event.repository.name, inputs.artifact-name-suffix) }}
name: ${{ format('{0}_cpp_coverage{1}', github.event.repository.name, inputs.artifact-name-suffix) }}
path: |
cpp_coverage/
coverage.lcov
bazel-testlogs/**/*.log
bazel-testlogs/**/*.xml
if-no-files-found: ignore
Expand Down
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,30 @@ This workflow:

---

### **7️ Copyright Check Workflow**
### **7️ C++ Coverage Workflow**
**Usage Example**
```yaml
name: C++ Coverage CI

on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
merge_group:
types: [checks_requested]

jobs:
coverage-report:
uses: eclipse-score/cicd-workflows/.github/workflows/cpp-coverage.yml@main
with:
bazel-target: "//..."
```

---

### **8️ Copyright Check Workflow**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the numbers are a little bit strange ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

**Usage Example**
```yaml
name: Copyright Check CI
Expand All @@ -223,7 +246,7 @@ This workflow:

---

### **8️ Formatting Check Workflow**
### **9️ Formatting Check Workflow**
**Usage Example**
```yaml
name: Formatting Check CI
Expand All @@ -249,7 +272,7 @@ This workflow:
> **Default:** `test //:format.check`

---
### **9️ Required Approvals Workflow**
### **10️ Required Approvals Workflow**

This workflow enforces **stricter CODEOWNERS checks** than GitHub’s defaults.
Normally, GitHub requires approval from *any one* codeowner when multiple are listed.
Expand Down Expand Up @@ -292,8 +315,7 @@ jobs:
---



### **10️ QNX Build (Gated) Workflow**
### **11️ QNX Build (Gated) Workflow**

Use this workflow when you need QNX secrets for forked PRs and want a manual approval gate via an environment.

Expand Down