Skip to content

Commit 6c6a03a

Browse files
committed
Update badges github action
1 parent 3e919be commit 6c6a03a

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

.github/workflows/badges.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install PHP
2222
uses: shivammathur/[email protected]
2323
with:
24-
php-version: 8.2
24+
php-version: 8.3
2525
extensions: xdebug
2626
ini-values: zend.assertions=1
2727

@@ -32,26 +32,30 @@ jobs:
3232
timeout-minutes: 3
3333
run: vendor/bin/phpunit --coverage-clover clover.xml
3434

35-
- name: Get lines of code (more sophisticated)
35+
- name: Make code coverage badge
36+
uses: timkrase/[email protected]
37+
with:
38+
coverage_badge_path: .github/coverage.svg
39+
push_badge: false
40+
41+
- name: Get lines of code (more sophisticated, uses scc)
3642
id: scc
37-
uses: iryanbell/scc-docker-action@v1.0.2
43+
uses: hdmsantander/scc-docker-action@3.0
3844
with:
39-
args: ${{ env.workspace }} -i php --exclude-dir vendor --format json src
45+
args: ${{ env.workspace }} -i php --exclude-dir vendor --format json -o scc.json src
46+
47+
- name: Parse scc output
48+
id: parse_scc
49+
run: echo "::set-output name=loc::$(jq '.[0].Code' scc.json)"
4050

4151
- name: Make lines of code badge
4252
uses: emibcn/[email protected]
4353
with:
4454
label: Lines of Code
45-
status: ${{ fromJson(steps.scc.outputs.scc)[0].Code }}
55+
status: ${{ steps.parse_scc.outputs.loc }}
4656
color: 'blue'
4757
path: .github/lines.svg
4858

49-
- name: Make code coverage badge
50-
uses: timkrase/[email protected]
51-
with:
52-
coverage_badge_path: .github/coverage.svg
53-
push_badge: false
54-
5559
- name: Git push badges to image-data branch
5660
uses: peaceiris/actions-gh-pages@v3
5761
with:

0 commit comments

Comments
 (0)