forked from spidernet-io/spiderpool
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (71 loc) · 2.49 KB
/
status.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Badge Status
env:
CODESTATUSSCRIPT: "./tools/scripts/codeCoverage.sh"
E2ESTATUSSCRIPT: "./tools/scripts/e2ecover.sh"
TODOSCRIPT: "./tools/scripts/todocover.sh"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update-badges:
name: Update Badges
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download cloc
run: sudo apt-get update -y && sudo apt-get install -y cloc
- name: Get the Numbers
shell: bash
run: |
TOOL_PATH=${{ env.CODESTATUSSCRIPT }}
CODE_LINES=$( ${TOOL_PATH} --code-lines )
COMMENT_PERCENTAGE=$( ${TOOL_PATH} --comment-percent )
echo "CODE_LINES=${CODE_LINES}" >> $GITHUB_ENV
echo "COMMENT_PERCENTAGE=${COMMENT_PERCENTAGE}" >> $GITHUB_ENV
TOOL_PATH=${{ env.E2ESTATUSSCRIPT }}
E2E_STATUS=$( ${TOOL_PATH} )
echo "E2E_STATUS=${E2E_STATUS}" >> $GITHUB_ENV
TOOL_PATH=${{ env.TODOSCRIPT }}
TODO_STATUS=$( ${TOOL_PATH} )
echo "TODO_STATUS=${TODO_STATUS}" >> $GITHUB_ENV
- name: Create Lines-of-Code-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.WELAN_PAT }}
gistID: 7e54bfe38fec206e7710c74ad55a5139
filename: spiderpoolcodeline.json
label: Code Lines
message: ${{ env.CODE_LINES }}
color: lightgrey
- name: Create Comments-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.WELAN_PAT }}
gistID: 93b7ba26a4600fabe100ff640f9b3bd3
filename: spiderpoolcomment.json
label: Comments
message: ${{ env.COMMENT_PERCENTAGE }}%
valColorRange: ${{ env.COMMENT_PERCENTAGE }}
maxColorRange: 100
minColorRange: 0
- name: Create E2E-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.WELAN_PAT }}
gistID: e1d3c092d1b9f61f1c8e36f09d2809cb
filename: spiderpoole2e.json
label: e2e cover
message: ${{ env.E2E_STATUS }}
color: lightgrey
- name: Create TODO-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.WELAN_PAT }}
gistID: cd9ef69f5ba8724cb4ff896dca953ef4
filename: spiderpooltodo.json
label: todo
message: ${{ env.TODO_STATUS }}
color: lightgrey