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+ export-cache :
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Restore cache
31+ uses : actions/cache/restore@v4
32+ with :
33+ path : ./cached-data
34+ key : setup-bazel-1-linux-x64-disk-tracing-cache-do-not-use-9898d4bbfd9ddc300a4a4f7c77985ccc1f7f7e4c05a2362dac9deb6540710cc1
35+
36+ - name : Upload as artifact
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : bazel-cache-export
40+ path : ./cached-data
41+ retention-days : 1
42+ test_and_docs :
43+ runs-on : ubuntu-22.04
44+ permissions :
45+ contents : write # required to upload release assets
46+ pull-requests : write
47+
48+ steps :
49+ - name : Clean disk space
50+ uses : eclipse-score/more-disk-space@v1
51+ - name : Install lcov
52+ run : |
53+ sudo apt-get update
54+ sudo apt-get install -y lcov
55+ sudo apt-get install -y tree
56+
57+ - name : Inspector1
58+ run : |
59+ pwd
60+ ls -la
61+
62+ - name : Inspect Bazel caches
63+ if : always()
64+ run : |
65+ for cache in ~/.cache/bazelisk ~/.cache/bazel-disk-cache ~/.cache/bazel-repo-cache; do
66+ echo "=== $cache ==="
67+ du -sh "$cache" 2>/dev/null && find "$cache" -maxdepth 2 | head -20 || echo "MISSING"
68+ done
69+
70+ ls -la /home/runner/.bazel/external || true
71+
72+
73+ - name : Setup Bazel
74+ uses : bazel-contrib/setup-bazel@0.18.0
75+ with :
76+ bazelisk-cache : true
77+ disk-cache : tracing-cache-do-not-use
78+ repository-cache : true
79+ cache-save : true
80+ - name : Inspect Bazel caches
81+ if : always()
82+ run : |
83+ echo $(pwd)
84+ for cache in ~/.cache/bazelisk ~/.cache/bazel-disk-cache ~/.cache/bazel-repo-cache; do
85+ echo "=== $cache ==="
86+ du -sh "$cache" 2>/dev/null && find "$cache" -maxdepth 2 | head -20 || echo "MISSING"
87+ done
88+
89+ ls -la /home/runner/.bazel/external || true
90+
91+ - name : Set up Python 3
92+ uses : actions/setup-python@v5
93+ with :
94+ python-version : ' 3.12'
95+
96+ - name : Checkout repository (pull_request_target via workflow_call)
97+ if : ${{ github.event_name == 'pull_request_target' }}
98+ uses : actions/checkout@v4
99+ with :
100+ ref : ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
101+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
102+
103+ - name : Checkout repository
104+ if : ${{ github.event_name != 'pull_request_target' }}
105+ uses : actions/checkout@v4
106+
107+ - name : Inspector3
108+ run : |
109+ ls -la
110+
111+ - name : Execute Unit Tests with Coverage Analysis
112+ run : |
113+ echo "BEFORE INGO"
114+ ls -la /home/runner/.bazel/external || true
115+ bazel info
116+ OUTPUT_BASE=$(bazel info output_base 2>/dev/null)
117+ echo "=== external ($OUTPUT_BASE/external) ==="
118+ tree $OUTPUT_BASE/external
119+
120+ # python ./scripts/quality_runners.py --modules-to-test score_logging
121+
122+ # echo "tree after run"
123+ # tree $OUTPUT_BASE/external
124+
125+
126+
127+
128+
129+
0 commit comments