-
Notifications
You must be signed in to change notification settings - Fork 22
Integration status dashboard #176
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
base: main
Are you sure you want to change the base?
Changes from all commits
e122c3f
ded9733
afc03a1
774c651
b0e35a7
3c2f758
1abbc3c
8aed677
f012938
85b4d62
76d1d94
f24eb42
80355ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # ******************************************************************************* | ||
| # 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: Internal Tooling Tests | ||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| push: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| internal_tests: | ||
| uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@main | ||
| with: | ||
| bazel-target: "test //scripts/tooling:tooling_tests" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ on: | |
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| jobs: | ||
| test_and_docs: | ||
| runs-on: ubuntu-22.04 | ||
|
|
@@ -111,6 +113,8 @@ jobs: | |
| --github_user=${{ github.repository_owner }} \ | ||
| --github_repo=${{ github.event.repository.name }} | ||
|
|
||
| CURRENT=$(realpath .) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was wondering why I could not find the generated html file but it's pull_request_target :D |
||
| bazel run //scripts/tooling -- misc html_report --output ${CURRENT}/_build/status_dashboard.html | ||
| tar -cf github-pages.tar _build | ||
| - name: Upload documentation artifact | ||
| uses: actions/upload-artifact@v4.4.0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,4 +67,5 @@ use_format_targets() | |
|
|
||
| exports_files([ | ||
| "MODULE.bazel", | ||
| "pyproject.toml", | ||
| ]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we track the MODULE.bazel.lock? should this be in .gitignore? |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we migrate all the py scripts to be executable via bazel?! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| load("@ref_int_scripts_env//:requirements.bzl", "all_requirements") | ||
| load("@rules_python//python:defs.bzl", "py_binary", "py_library") | ||
| load("@rules_python//python:pip.bzl", "compile_pip_requirements") | ||
| load("@score_tooling//python_basics:defs.bzl", "score_py_pytest") | ||
|
|
||
| # In order to update the requirements, change the `requirements.in` file and run: | ||
| # `bazel run //src:requirements.update`. | ||
| # This will update the `requirements.txt` file. | ||
| # To upgrade all dependencies to their latest versions, run: | ||
| # `bazel run //src:requirements.update -- --upgrade`. | ||
| compile_pip_requirements( | ||
| name = "requirements", | ||
| srcs = [ | ||
| "requirements.in", | ||
| "@score_tooling//python_basics:requirements.txt", | ||
| ], | ||
| requirements_txt = "requirements.txt", | ||
| tags = [ | ||
| "manual", | ||
| ], | ||
| ) | ||
|
|
||
| # Library target | ||
| py_library( | ||
| name = "lib", | ||
| srcs = glob(["lib/**/*.py"]), | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| # CLI library target (shared between binary and tests) | ||
| py_library( | ||
| name = "cli", | ||
| srcs = glob(["cli/**/*.py"]), | ||
| data = [ | ||
| ":cli/misc/assets/report_template.html", | ||
| ], | ||
| deps = [":lib"] + all_requirements, | ||
| ) | ||
|
|
||
| # CLI binary target | ||
| py_binary( | ||
| name = "tooling", | ||
| srcs = ["cli/main.py"], | ||
| main = "cli/main.py", | ||
| visibility = ["//visibility:public"], | ||
| deps = [":cli"], | ||
| ) | ||
|
|
||
| # Tests target | ||
| score_py_pytest( | ||
| name = "tooling_tests", | ||
| srcs = glob(["tests/**/*.py"]), | ||
| data = [ | ||
| ":cli/misc/assets/report_template.html", | ||
| ], | ||
| pytest_config = "//:pyproject.toml", | ||
| deps = [ | ||
| ":cli", | ||
| ":lib", | ||
| ] + all_requirements, | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Tooling scripts | ||
|
|
||
| ## Running tooling CLI | ||
|
|
||
| ```bash | ||
| bazel run //scripts/tooling -- --help | ||
| ``` | ||
|
|
||
| ```bash | ||
| bazel run //scripts/tooling -- misc --help | ||
| ``` | ||
|
|
||
| ## Creating HTML report | ||
|
|
||
| ```bash | ||
| bazel run //scripts/tooling -- misc html_report | ||
| ``` | ||
|
|
||
| ## Running tests | ||
|
|
||
| ```bash | ||
| bazel test //scripts/tooling_tests | ||
| ``` | ||
|
|
||
| ## Updating dependencies | ||
|
|
||
| Update a list of requirements in [requirements.in](requirements.in) file and then | ||
| regenerate lockfile [requirements.txt](requirements.txt) with: | ||
|
|
||
| ```bash | ||
| bazel run //scripts/tooling:requirements.update | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* |
pawelrutkaq marked this conversation as resolved.
Show resolved
Hide resolved
pawelrutkaq marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| import argparse | ||
| import sys | ||
|
|
||
|
|
||
| def main() -> None: | ||
| parser = argparse.ArgumentParser(prog="tooling") | ||
| subparsers = parser.add_subparsers(dest="group", metavar="GROUP") | ||
| subparsers.required = True | ||
|
|
||
| from scripts.tooling.cli.misc import register as _register_misc | ||
|
|
||
| _register_misc(subparsers) | ||
|
|
||
| args = parser.parse_args() | ||
| sys.exit(args.func(args)) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
pawelrutkaq marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| import argparse | ||
|
|
||
|
|
||
| def register(subparsers: argparse._SubParsersAction) -> None: | ||
| misc_parser = subparsers.add_parser("misc", help="Miscellaneous utilities") | ||
| misc_sub = misc_parser.add_subparsers(dest="command", metavar="COMMAND") | ||
| misc_sub.required = True | ||
|
|
||
| from scripts.tooling.cli.misc.html_report import register as _register_html_report | ||
|
|
||
| _register_html_report(misc_sub) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need it now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because I added a fetch during report generation so if user does not have PAT, it still see a diff in moment raport is generated