-
Notifications
You must be signed in to change notification settings - Fork 29
167 lines (164 loc) · 4.85 KB
/
test.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Test actions
on:
push:
branches: ["**"]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test-format-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: FreeRTOS/coreMQTT
ref: main
path: coreMQTT
- name: Test formatting check action
uses: ./formatting
with:
path: coreMQTT
exclude-files: lexicon.txt
exclude-dirs: build,docs
test-complexity-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: FreeRTOS/coreMQTT
ref: main
path: coreMQTT
- name: Test complexity check action
uses: ./complexity
with:
path: coreMQTT
# For coreMQTT the code complexity threshold is 10.
horrid_threshold: 10
test-doxygen-zip-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.11.0'
- uses: actions/checkout@v2
with:
repository: aws/aws-iot-device-sdk-embedded-C
submodules: recursive
ref: main
path: aws-iot-device-sdk-embedded-C
- name: Test doxygen build action
uses: ./doxygen
with:
path: ./aws-iot-device-sdk-embedded-C
libs_parent_dir_path: libraries/standard,libraries/aws
generate_zip: true
test-doxygen-non-zip-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: FreeRTOS/coreMQTT
ref: main
path: coreMQTT
- name: Test doxygen build action
uses: ./doxygen
with:
path: coreMQTT
test-spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: FreeRTOS/coreMQTT
ref: main
path: coreMQTT
- name: Test spell check action
uses: ./spellings
with:
path: coreMQTT
test-coverage-cop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: FreeRTOS/coreMQTT
ref: main
path: coreMQTT
- name: Build
run: |
sudo apt-get install -y lcov
cmake -S ./coreMQTT/test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_CLONE_SUBMODULES=ON \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG'
make -C build/ all
- name: Test
run: |
cd build/
ctest -E system --output-on-failure
cd ..
- name: Run Coverage
run: |
make -C build/ coverage
declare -a EXCLUDE=("\*test/\*" "\*CMakeCCompilerId\*" "\*mocks\*")
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
- name: Test coverage cop action
uses: ./coverage-cop
with:
path: ./build/coverage.info
branch-coverage-min: 70
line-coverage-min: 100
test-memory-statistics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test memory statistics action
uses: ./memory_statistics
with:
path: memory_statistics/test
config: ./memory_statistics_config.json
output: ./size_table_new.html
check_against: ./size_table_expected.html
test-link-verifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python environment
uses: actions/setup-python@v2
with:
python-version: '3.11.0'
- name: Test link verifier action
uses: ./link-verifier
with:
path: ./
exclude-dirs: complexity,formatting
include-file-types: .c,.html
test-manifest-verifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python environment
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Checkout the FreeRTOS/FreeRTOS repository for testing action on.
uses: actions/checkout@v2
with:
repository: FreeRTOS/FreeRTOS
ref: '202107.00'
path: FreeRTOS
submodules: recursive
- name: Test manifest verifier
uses: ./manifest-verifier
with:
path: ./FreeRTOS
exclude-submodules: FreeRTOS-Plus/Test/CMock,FreeRTOS/Test/CMock/CMock,FreeRTOS/Test/litani
fail-on-incorrect-version: true