File tree Expand file tree Collapse file tree 2 files changed +41
-9
lines changed Expand file tree Collapse file tree 2 files changed +41
-9
lines changed Original file line number Diff line number Diff line change @@ -27,18 +27,20 @@ jobs:
27
27
test-complexity-check :
28
28
runs-on : ubuntu-latest
29
29
steps :
30
- - uses : actions/checkout@v2
31
- - uses : actions/checkout@v2
30
+ - uses : actions/checkout@v3
31
+ - uses : actions/checkout@v3
32
32
with :
33
33
repository : FreeRTOS/coreMQTT
34
34
ref : main
35
35
path : coreMQTT
36
+
36
37
- name : Test complexity check action
37
38
uses : ./complexity
38
39
with :
39
40
path : coreMQTT
40
41
# For coreMQTT the code complexity threshold is 10.
41
42
horrid_threshold : 10
43
+
42
44
test-doxygen-zip-check :
43
45
runs-on : ubuntu-latest
44
46
steps :
Original file line number Diff line number Diff line change @@ -12,16 +12,46 @@ inputs:
12
12
horrid_threshold :
13
13
description : ' The horrid threshold parameter passed to the invocation of complexity'
14
14
required : false
15
- default : 8
15
+ default : 10
16
+
16
17
runs :
17
18
using : " composite"
18
- steps :
19
- - name : Setup
20
- run : sudo apt-get install complexity
19
+ steps :
20
+
21
+ - env :
22
+ stepName : Install Dependencies
23
+ bashPass : \033[32;1mPASSED -
24
+ bashInfo : \033[33;1mINFO -
25
+ bashFail : \033[31;1mFAILED -
26
+ bashEnd : \033[0
27
+ name : ${{ env.stepName }}
21
28
shell : bash
22
- - name : Complexity
29
+ run : |
30
+ # ${{ env.stepName }}
31
+ echo -e "::group::${{ env.stepName }}"
32
+ sudo apt-get install complexity -y
33
+ echo -e "::endgroup::"
34
+ echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}"
35
+
36
+ - env :
37
+ stepName : Complexity
38
+ bashPass : \033[32;1mPASSED -
39
+ bashInfo : \033[33;1mINFO -
40
+ bashFail : \033[31;1mFAILED -
41
+ bashEnd : \033[0m
23
42
working-directory : ${{ inputs.path }}
43
+ shell : bash
24
44
run : |
45
+ # ${{ env.stepName }}
46
+ echo -e "::group::${{ env.stepName }}"
47
+ echo -e "${{ env.bashInfo }} Have complexity limit of ${{ inputs.horrid_threshold }} ${{ env.bashEnd }}"
48
+ exitStatus=0
49
+
50
+ # Use find to find all files ending with a .c inside of the input directory
51
+ # From there run the complexity check against them
25
52
find ${{ inputs.source_path }}/ -iname '*.c' |\
26
- xargs complexity --scores --threshold=0 --horrid-threshold=${{ inputs.horrid_threshold }}
27
- shell : bash
53
+ xargs complexity --scores --threshold=0 --horrid-threshold=${{ inputs.horrid_threshold }}
54
+
55
+ echo -e "::endgroup::"
56
+ echo -e "${{ env.bashPass }} ${{env.stepName }} ${{ env.bashEnd }}"
57
+ exit 0
You can’t perform that action at this time.
0 commit comments