Skip to content

Commit 1238da5

Browse files
tiborpilzTibor Pilz
authored and
Tibor Pilz
committed
ci: fix badge creation
1 parent 27dedfe commit 1238da5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/test.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
run: poetry install --no-interaction --no-root
2525

2626
- name: Test
27+
id: test
2728
run: |
2829
poetry run pytest --cov=commitomatic --cov-report=xml
2930
curl https://deepsource.io/cli | sh
@@ -36,28 +37,28 @@ jobs:
3637
echo "branch=badges" >> $GITHUB_OUTPUT
3738
env:
3839
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
39-
BADGE_PATH: ${{ steps.extract_branch.outputs.branch }}/test-badge.svg
40+
BADGE_PATH: badges/test-coverage.svg
4041

4142
- name: Generate the badge SVG image
4243
uses: emibcn/[email protected]
4344
id: badge
4445
with:
4546
label: 'Test coverage'
46-
status: ${{ steps.coverage.outputs.lines }}
47+
status: ${{ steps.test.outputs.lines }}
4748
color: 'blue,555,daf'
48-
path: ${{ steps.coverage.outputs.path }}
49+
path: ${{ steps.test.outputs.path }}
4950

5051
- name: Upload badge as artifact
5152
uses: actions/upload-artifact@v3
5253
with:
5354
name: badge
54-
path: ${{ steps.coverage.outputs.path }}
55+
path: ${{ steps.test.outputs.path }}
5556
if-no-files-found: error
5657

5758
- name: Commit badge
5859
continue-on-error: true
5960
env:
60-
BADGE: ${{ steps.coverage.outputs.path }}
61+
BADGE: ${{ steps.test.outputs.path }}
6162
run: |
6263
git config --local user.email "[email protected]"
6364
git config --local user.name "GitHub Action"
@@ -69,4 +70,4 @@ jobs:
6970
if: ${{ success() }}
7071
with:
7172
github_token: ${{ secrets.GITHUB_TOKEN }}
72-
branch: ${{ steps.coverage.outputs.branch }}
73+
branch: ${{ steps.test.outputs.branch }}

0 commit comments

Comments
 (0)