Skip to content

Commit

Permalink
[#258] Cleanup CI and Test Badge Creation
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbrown2 authored Dec 19, 2024
1 parent ec631f8 commit ca38c91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/mc_dc_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history

# Install dependencies and setup environment
- name: Install Dependencies
Expand Down Expand Up @@ -61,6 +63,11 @@ jobs:
curl -o coverage/line-coverage-badge.svg "https://img.shields.io/badge/line%20coverage-${LINE_COVERAGE_PERCENT}%25-brightgreen"
curl -o coverage/branch-coverage-badge.svg "https://img.shields.io/badge/branch%20coverage-${BRANCH_COVERAGE_PERCENT}%25-brightgreen"
# Fix detached HEAD state
- name: Fix Detached HEAD
run: git checkout -B ${GITHUB_REF##*/}
working-directory: ${{ github.workspace }}

# Commit badges to a separate branch
- name: Commit Coverage Badges
if: ${{ github.event_name == 'push' }}
Expand All @@ -72,6 +79,7 @@ jobs:
git add coverage/branch-coverage-badge.svg
git commit -m "Update coverage badges"
git push origin badges
working-directory: ${{ github.workspace }}

# Upload consolidated coverage report as an artifact
- name: Upload Coverage Report
Expand Down

0 comments on commit ca38c91

Please sign in to comment.