Skip to content

Commit 6ae1dc9

Browse files
authored
Merge branch 'main' into executableMonitor
2 parents 8dd88ab + d098bf5 commit 6ae1dc9

File tree

2 files changed

+41
-9
lines changed

2 files changed

+41
-9
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,20 @@ jobs:
2727
test-complexity-check:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v2
31-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v3
3232
with:
3333
repository: FreeRTOS/coreMQTT
3434
ref: main
3535
path: coreMQTT
36+
3637
- name: Test complexity check action
3738
uses: ./complexity
3839
with:
3940
path: coreMQTT
4041
# For coreMQTT the code complexity threshold is 10.
4142
horrid_threshold: 10
43+
4244
test-doxygen-zip-check:
4345
runs-on: ubuntu-latest
4446
steps:

complexity/action.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,46 @@ inputs:
1212
horrid_threshold:
1313
description: 'The horrid threshold parameter passed to the invocation of complexity'
1414
required: false
15-
default: 8
15+
default: 10
16+
1617
runs:
1718
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 }}
2128
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
2342
working-directory: ${{ inputs.path }}
43+
shell: bash
2444
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
2552
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

0 commit comments

Comments
 (0)