1+ # *******************************************************************************
2+ # Copyright (c) 2025 Contributors to the Eclipse Foundation
3+ #
4+ # See the NOTICE file(s) distributed with this work for additional
5+ # information regarding copyright ownership.
6+ #
7+ # This program and the accompanying materials are made available under the
8+ # terms of the Apache License Version 2.0 which is available at
9+ # https://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # SPDX-License-Identifier: Apache-2.0
12+ # *******************************************************************************
13+
14+ name : Code Quality & Documentation
15+
16+ permissions :
17+ contents : write
18+ pages : write
19+ pull-requests : write
20+ id-token : write
21+
22+ on :
23+ pull_request : # Allows forks to trigger the docs build
24+ types : [opened, reopened, synchronize]
25+
26+ jobs :
27+ test_and_docs :
28+ runs-on : ubuntu-22.04
29+ permissions :
30+ contents : write # required to upload release assets
31+ pull-requests : write
32+
33+ steps :
34+ - name : Clean disk space
35+ uses : eclipse-score/more-disk-space@v1
36+ - name : Install lcov
37+ run : |
38+ sudo apt-get update
39+ sudo apt-get install -y lcov
40+ sudo apt-get install -y tree
41+
42+ - name : Inspector1
43+ run : |
44+ pwd
45+ ls -la
46+
47+ - name : Inspect Bazel caches
48+ if : always()
49+ run : |
50+ for cache in ~/.cache/bazelisk ~/.cache/bazel-disk-cache ~/.cache/bazel-repo-cache; do
51+ echo "=== $cache ==="
52+ du -sh "$cache" 2>/dev/null && find "$cache" -maxdepth 2 | head -20 || echo "MISSING"
53+ done
54+
55+
56+ - name : Setup Bazel
57+ uses : bazel-contrib/setup-bazel@0.18.0
58+ with :
59+ bazelisk-cache : true
60+ disk-cache : tracing-cache-do-not-use
61+ repository-cache : true
62+ cache-save : true
63+ - name : Inspect Bazel caches
64+ if : always()
65+ run : |
66+ for cache in ~/.cache/bazelisk ~/.cache/bazel-disk-cache ~/.cache/bazel-repo-cache; do
67+ echo "=== $cache ==="
68+ du -sh "$cache" 2>/dev/null && find "$cache" -maxdepth 2 | head -20 || echo "MISSING"
69+ done
70+
71+ - name : Set up Python 3
72+ uses : actions/setup-python@v5
73+ with :
74+ python-version : ' 3.12'
75+
76+ - name : Checkout repository (pull_request_target via workflow_call)
77+ if : ${{ github.event_name == 'pull_request_target' }}
78+ uses : actions/checkout@v4
79+ with :
80+ ref : ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
81+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
82+
83+ - name : Checkout repository
84+ if : ${{ github.event_name != 'pull_request_target' }}
85+ uses : actions/checkout@v4
86+
87+ - name : Inspector3
88+ run : |
89+ ls -la
90+
91+ - name : Execute Unit Tests with Coverage Analysis
92+ run : |
93+ echo "tree before run"
94+ tree bazel-out/k8-fastbuild || true
95+ bazel info
96+ OUTPUT_BASE=$(bazel info output_base 2>/dev/null)
97+ echo "=== external ($OUTPUT_BASE/external) ==="
98+ ls -la "$OUTPUT_BASE/external" 2>/dev/null | head -20 || echo "MISSING"
99+ python ./scripts/quality_runners.py --modules-to-test score_logging
100+ echo "tree after run"
101+ tree bazel-out/k8-fastbuild
102+
103+
104+
105+
106+
107+
0 commit comments