-
Notifications
You must be signed in to change notification settings - Fork 2
Bootstrap score_coverage from tooling/coverage with tests, lint and docs #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
71e845b
Bootstrap score_coverage module from tooling/coverage
dcalavrezo-qorix 0322ad0
Port generate_coverage_html from shell to Python
dcalavrezo-qorix f0d359f
Add unit tests for justify and effective_coverage
dcalavrezo-qorix 8c44935
Add analysis tests, ground truth, fault injection, self-coverage gate
dcalavrezo-qorix 1bc1ec8
Cover merger and reporter end to end with fake llvm tools
dcalavrezo-qorix cf107bb
Test the gcovr (QNX) backend of effective_coverage against real markup
dcalavrezo-qorix 1b6fd71
Add static analysis (ruff, pylint, ty) and Rust analysis-test fixtures
dcalavrezo-qorix 06c9678
Add the docs-as-code tree (WP4)
dcalavrezo-qorix 10b5476
Generate the test-to-requirement links (WP3/WP4 leftover)
dcalavrezo-qorix 87fc38a
Add gitlint configuration aligned with eclipse-score/score
dcalavrezo-qorix 64581de
Refresh MODULE.bazel.lock for the score_toolchains_rust extensions
dcalavrezo-qorix c227e72
Fix collection of JUnit results for the docs build
dcalavrezo-qorix 39516c8
Move the docs output to _build for the reusable docs workflow
dcalavrezo-qorix f06cc55
Add CODEOWNERS (infrastructure maintainers, as in eclipse-score/tools)
dcalavrezo-qorix 021fb6d
Make the docs modules regular (non-dev) dependencies
dcalavrezo-qorix b13e350
Address review: Python 3.12, Bazel 8.6.0, drop REUSE, rsync collection
dcalavrezo-qorix 7e36b68
Refresh MODULE.bazel.lock after the switch to Bazel 8.6.0
dcalavrezo-qorix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Nested consumer workspace with its own MODULE.bazel; built by | ||
| # integration_tests/run_integration_test.sh, not as part of //... | ||
| integration_tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ | ||
| common --registry=https://bcr.bazel.build | ||
|
|
||
| # score_tooling (dev dependency) transitively brings android_sdk_repository | ||
| # into the graph; an empty ANDROID_HOME keeps it inert on stripped runners. | ||
| common --repo_env=ANDROID_HOME= | ||
|
|
||
| test --test_output=errors | ||
|
|
||
| # Rust toolchain for the analysis-test fixtures (same registration as the | ||
| # consumer repos; the standard Ferrocene toolchain of score_toolchains_rust). | ||
| common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu | ||
|
|
||
| # Static analysis of the Python (ruff, pylint, ty) as aspects; findings fail | ||
| # the build. Usage: bazel build --config=lint //score_coverage/... //tools/... | ||
| build:lint --aspects=//tools:linters.bzl%ruff,//tools:linters.bzl%pylint,//tools:linters.bzl%ty | ||
| build:lint --output_groups=+rules_lint_human | ||
| build:lint --@aspect_rules_lint//lint:fail_on_violation | ||
|
|
||
| # Per-developer overrides (disk cache, etc.). Must stay last: bazelrc is last-wins. | ||
| try-import %workspace%/user.bazelrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 8.6.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # 👋 Code owners help maintain this repository and keep it aligned with our technical vision. | ||
| # You're responsible for reviewing changes, ensuring quality, and guiding contributors. | ||
| # You're also encouraged to help triage issues and keep discussions constructive and focused. | ||
| # Ownership can be shared, delegated, or updated as the project evolves. | ||
|
|
||
| # For more information about CODEOWNERS, see: | ||
| # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
|
|
||
| # https://github.com/orgs/eclipse-score/teams/infrastructure-maintainers | ||
| * @AlexanderLanin @MaximilianSoerenPollak @dcalavrezo-qorix @nradakovic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: "Gitlint Action" | ||
| description: "An action to install and run Gitlint on PR commits" | ||
| inputs: | ||
| pr-number: | ||
| description: "Pull Request number used to fetch commits" | ||
| required: true | ||
| base-branch: | ||
| description: "Base branch to compare commits against (default: origin/main)" | ||
| default: "origin/main" | ||
| required: false | ||
| runs: | ||
| using: "docker" | ||
| image: "jorisroovers/gitlint:0.19.1" | ||
| entrypoint: /bin/sh | ||
| args: | ||
| - -c | ||
| - | | ||
| git config --global --add safe.directory /github/workspace && \ | ||
| git fetch origin +refs/heads/main:refs/remotes/origin/main && \ | ||
| git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \ | ||
| if ! gitlint --commits origin/main..HEAD; then \ | ||
| echo -e "\nWARNING: Your commit message does not follow the required format." && \ | ||
| echo "Formatting rules: https://eclipse-score.github.io/score/process/guidance/git/index.html" && \ | ||
| echo -e "To fix your commit message, run:\n" && \ | ||
| echo " git commit --amend" && \ | ||
| echo "Then update your commit (fix gitlint warnings). Finally, force-push:" && \ | ||
| echo " git push --force-with-lease" && \ | ||
| exit 1; \ | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: Copyright checks | ||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| merge_group: | ||
| types: [checks_requested] | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| copyright-check: | ||
| uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 | ||
| with: | ||
| bazel-target: "run //tools:copyright.check" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: Formatting checks | ||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| merge_group: | ||
| types: [checks_requested] | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| ANDROID_HOME: "" | ||
| ANDROID_SDK_ROOT: "" | ||
| jobs: | ||
| formatting-check: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7.0.1 | ||
| - uses: castler/setup-bazel@cache-optimized | ||
| with: | ||
| bazelisk-cache: true | ||
| disk-cache: format | ||
| repository-cache: true | ||
| cache-optimized: true | ||
| cache-save: ${{ github.ref == 'refs/heads/main' }} | ||
| - name: Run formatting checks | ||
| # score_tooling >= 2 tags format tests `manual`; lift the tag filter. | ||
| run: bazel test --test_tag_filters= //tools:format.check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: Gitlint check | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| lint-commits: | ||
| name: check-commit-messages | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Run Gitlint Action | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| uses: ./.github/actions/gitlint | ||
| with: | ||
| pr-number: ${{ github.event.number }} | ||
| base-branch: ${{ github.event.pull_request.base.ref }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: License check preparation | ||
| on: | ||
| pull_request_target: | ||
| types: [opened, reopened, synchronize] | ||
| merge_group: | ||
| types: [checks_requested] | ||
| permissions: | ||
| pull-requests: write | ||
| issues: write | ||
| jobs: | ||
| license-check: | ||
| uses: eclipse-score/cicd-workflows/.github/workflows/license-check.yml@main | ||
| with: | ||
| repo-url: "${{ github.server_url }}/${{ github.repository }}" | ||
| secrets: | ||
| dash-api-token: ${{ secrets.ECLIPSE_GITLAB_API_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: Tests | ||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| push: | ||
| branches: | ||
| - main | ||
| merge_group: | ||
| types: [checks_requested] | ||
| concurrency: | ||
| group: tests-${{ github.event.pull_request.number || github.run_id }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
| permissions: | ||
| contents: write | ||
| pages: write | ||
| pull-requests: write | ||
| id-token: write | ||
| env: | ||
| ANDROID_HOME: "" | ||
| ANDROID_SDK_ROOT: "" | ||
| jobs: | ||
| unit_tests: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7.0.1 | ||
| - name: Free Disk Space (Ubuntu) | ||
| uses: eclipse-score/more-disk-space@v1 | ||
| with: | ||
| level: 4 | ||
| - uses: castler/setup-bazel@cache-optimized | ||
| with: | ||
| bazelisk-cache: true | ||
| disk-cache: unit_tests | ||
| repository-cache: true | ||
| cache-optimized: true | ||
| cache-save: ${{ github.ref == 'refs/heads/main' }} | ||
| - name: Build everything | ||
| run: bazel build --lockfile_mode=error //... | ||
| - name: Run unit and Starlark analysis tests | ||
| run: bazel test --lockfile_mode=error //score_coverage/... //tools/... | ||
| - name: Static analysis of the Python (ruff, pylint, ty; findings fail the build) | ||
| run: bazel build --lockfile_mode=error --config=lint //score_coverage/... //tools/... | ||
| - name: Measure structural coverage of the tool itself (coverage.py) | ||
| run: bazel coverage --lockfile_mode=error --combined_report=lcov //score_coverage/tests:all | ||
| - name: "Gate structural coverage (ratchet, raise as tests land; target 100/100)" | ||
| run: | | ||
| bazel run --lockfile_mode=error //tools:self_coverage_gate -- \ | ||
| --min-lines 95 --min-branches 87 --summary-md "$GITHUB_STEP_SUMMARY" | ||
| - name: Ensure the lockfile is up to date | ||
| run: | | ||
| bazel mod deps --lockfile_mode=update | ||
| git diff --exit-code MODULE.bazel.lock | ||
| - name: Collect JUnit results for the documentation build | ||
| # docs-as-code links testcases to requirements from these files | ||
| # (tests-report/<bazel-testlogs path>/test.xml). | ||
| run: | | ||
| rm -rf tests-report && mkdir -p tests-report/score_coverage | ||
| rsync -amL --include='*/' --include='test.xml' --exclude='*' bazel-testlogs/score_coverage/ tests-report/score_coverage/ | ||
| echo "collected $(find tests-report -name test.xml | wc -l) test.xml files" | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: tests-report | ||
| path: tests-report | ||
| if-no-files-found: error | ||
| retention-days: 3 | ||
| integration_tests: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7.0.1 | ||
| - name: Free Disk Space (Ubuntu) | ||
| uses: eclipse-score/more-disk-space@v1 | ||
| with: | ||
| level: 4 | ||
| - uses: castler/setup-bazel@cache-optimized | ||
| with: | ||
| bazelisk-cache: true | ||
| disk-cache: integration_tests | ||
| repository-cache: true | ||
| cache-optimized: true | ||
| cache-save: ${{ github.ref == 'refs/heads/main' }} | ||
| - name: Run the end-to-end pipeline test (C++ + Rust consumer workspace) | ||
| run: integration_tests/run_integration_test.sh | ||
| - name: Upload coverage report of the integration workspace | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: integration_coverage_report | ||
| path: integration_tests/coverage_artifact | ||
| if-no-files-found: ignore | ||
| retention-days: 10 | ||
| docs: | ||
| needs: unit_tests | ||
| uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@93aac16ada7d247bbb6ae926509ddea74cf5213a # v0.0.2 | ||
| permissions: | ||
| contents: write | ||
| pages: write | ||
| pull-requests: write | ||
| id-token: write | ||
| with: | ||
| # docs() lives in //docs (the root package must not load dev deps), so | ||
| # the output is docs/_build; the reusable workflow archives _build. | ||
| bazel-target: "//docs:docs && mv docs/_build _build" | ||
| tests-report-artifact: tests-report | ||
| retention-days: 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| bazel-* | ||
| external | ||
| .vscode/ | ||
| .clwb/ | ||
| user.bazelrc | ||
|
|
||
| __pycache__ | ||
| .ruff_cache/ | ||
|
|
||
| # Outputs of integration_tests/run_integration_test.sh | ||
| integration_tests/coverage_artifacts.zip | ||
| integration_tests/lcov.dat | ||
| integration_tests/coverage_linux/ | ||
| integration_tests/summary.md | ||
| integration_tests/step_summary.md | ||
| integration_tests/coverage_artifact/ | ||
| integration_tests/actual_normalised.dat | ||
| integration_tests/expected_normalised.dat | ||
| integration_tests/typo_dir/ | ||
| integration_tests/typo.log | ||
| integration_tests/report.backup | ||
|
|
||
| # Generated by docs-as-code on every docs build | ||
| ubproject.toml | ||
| _build/ | ||
| tests-report/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| # Commit message rules, aligned with eclipse-score/score: 72-character titles, | ||
| # body lines unrestricted (B1) so DCO sign-off lines with long addresses pass. | ||
| [general] | ||
| ignore=T3,T5,B1,B5,B6,B7 | ||
| regex-style-search=true | ||
|
|
||
| [title-max-length] | ||
| line-length=72 | ||
|
|
||
| [body-first-line-empty] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.