Skip to content

Commit 468fea5

Browse files
authored
[#258] MCDC Test
1 parent 813d6bf commit 468fea5

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

.github/workflows/mc_dc_coverage.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,18 @@ jobs:
2525
- name: Configure Safe Directory
2626
run: git config --global --add safe.directory $GITHUB_WORKSPACE
2727

28-
- name: Install Dependencies
28+
- name: Install Dependencies (Including Clang)
2929
env:
3030
DEBIAN_FRONTEND: noninteractive
31-
TZ: Etc/UTC
3231
run: |
3332
echo "Installing dependencies..."
3433
apt-get update
35-
apt-get install -y lcov libcurl4-openssl-dev libmariadb-dev libmariadb-dev-compat python3 python3-pip python3-venv \
36-
gcovr bc pipx
34+
apt-get install -y \
35+
lcov libcurl4-openssl-dev libmariadb-dev libmariadb-dev-compat \
36+
python3 python3-pip python3-venv gcovr bc pipx wget \
37+
software-properties-common clang libclang-dev
3738
pipx install --system-site-packages mcdc-checker
3839
39-
- name: Set up Clang
40-
uses: egor-tensin/setup-clang@v1
41-
with:
42-
version: latest
43-
platform: x64
44-
4540
- name: Verify Clang Installation
4641
run: |
4742
echo "Checking clang binary..."
@@ -63,8 +58,8 @@ jobs:
6358
BRANCH_COVERAGE=$(grep -oP '(?<=branch-rate=")[0-9.]+(?=")' doc/coverage/coverage_report.xml | head -n 1)
6459
LINE_COVERAGE_PERCENT=$(printf "%.0f" $(echo "$LINE_COVERAGE * 100" | bc))
6560
BRANCH_COVERAGE_PERCENT=$(printf "%.0f" $(echo "$BRANCH_COVERAGE * 100" | bc))
66-
if [ "$LINE_COVERAGE_PERCENT" -ge 80 ]; then LINE_COLOR="brightgreen"; elif [ "$LINE_COVERAGE_PERCENT" -ge 50 ]; then LINE_COLOR="yellow"; else LINE_COLOR="red"; fi
67-
if [ "$BRANCH_COVERAGE_PERCENT" -ge 80 ]; then BRANCH_COLOR="brightgreen"; elif [ "$BRANCH_COVERAGE_PERCENT" -ge 50 ]; then BRANCH_COLOR="yellow"; else BRANCH_COLOR="red"; fi
61+
if [ "$LINE_COVERAGE_PERCENT" -ge 80 ]; then LINE_COLOR="brightgreen"; elif [ "$LINE_COVERAGE_PERCENT" -ge 50"; then LINE_COLOR="yellow"; else LINE_COLOR="red"; fi
62+
if [ "$BRANCH_COVERAGE_PERCENT" -ge 80 ]; then BRANCH_COLOR="brightgreen"; elif [ "$BRANCH_COVERAGE_PERCENT" -ge 50"; then BRANCH_COLOR="yellow"; else BRANCH_COLOR="red"; fi
6863
curl -o doc/coverage/line-coverage-badge.svg "https://img.shields.io/badge/line%20coverage-${LINE_COVERAGE_PERCENT}%25-${LINE_COLOR}"
6964
curl -o doc/coverage/branch-coverage-badge.svg "https://img.shields.io/badge/branch%20coverage-${BRANCH_COVERAGE_PERCENT}%25-${BRANCH_COLOR}"
7065

0 commit comments

Comments
 (0)