Skip to content

Commit cc53d1d

Browse files
xingyaowwopenhands-agentgithub-actions[bot]
authored
Openhands/move coverage badge to docs assets (#10)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5c54fd5 commit cc53d1d

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ jobs:
3232
run: uv run pytest -v --cov=openhands --cov-report=xml:coverage.xml --cov-report=term-missing tests/
3333

3434
- name: Code Coverage Summary
35-
if: always()
35+
if: ${{ always() && hashFiles('coverage.xml') != '' }}
36+
continue-on-error: true
3637
uses: irongut/CodeCoverageSummary@v1.3.0
3738
with:
38-
filename: coverage.xml
39+
files: coverage.xml
3940
badge: true
4041
fail_below_min: false
4142
format: markdown
@@ -60,6 +61,7 @@ jobs:
6061
path: |
6162
coverage.xml
6263
code-coverage-results.md
64+
docs/assets/coverage.svg
6365
if-no-files-found: ignore
6466
- name: Parse coverage percent
6567
if: always()
@@ -93,9 +95,9 @@ jobs:
9395
echo "color=$COLOR" >> $GITHUB_OUTPUT
9496
echo "pct=$PCT" >> $GITHUB_OUTPUT
9597
96-
- name: Ensure badges directory
98+
- name: Ensure docs/assets directory
9799
if: always()
98-
run: mkdir -p badges
100+
run: mkdir -p docs/assets
99101

100102
- name: Generate coverage badge
101103
if: always()
@@ -104,19 +106,19 @@ jobs:
104106
label: coverage
105107
status: "${{ steps.color.outputs.pct }}%"
106108
color: "${{ steps.color.outputs.color }}"
107-
path: badges/coverage.svg
109+
path: docs/assets/coverage.svg
108110

109111
- name: Upload badge artifact (PRs)
110112
if: ${{ always() && github.event_name == 'pull_request' }}
111113
uses: actions/upload-artifact@v4
112114
with:
113115
name: coverage-badge
114-
path: badges/coverage.svg
116+
path: docs/assets/coverage.svg
115117

116118
- name: Commit coverage badge (push builds)
117119
if: ${{ always() && github.event_name == 'push' }}
118120
uses: EndBug/add-and-commit@v9
119121
with:
120-
add: "badges/coverage.svg"
122+
add: "docs/assets/coverage.svg"
121123
message: "docs: update coverage badge [skip ci]"
122124
default_author: github_actions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prototype for OpenHands V1
22

3-
[![Coverage](badges/coverage.svg)](./badges/coverage.svg)
3+
[![Coverage](docs/assets/coverage.svg)](./docs/assets/coverage.svg)
44

55
This folder contains my tasks of completely refactor [OpenHands](https://github.com/All-Hands-AI/OpenHands) project V0 into the new V1 version. There's a lot of changes, including (non-exhausive):
66

Lines changed: 7 additions & 7 deletions
Loading

0 commit comments

Comments
 (0)