File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : scan-provider-agents
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c'
7+ - ' cvmassistants/keyprovider/key-provider-agent/src/key_provider_agent.c'
8+ workflow_dispatch : {}
9+
10+ jobs :
11+ scan-provider-agents :
12+
13+ name : Scan ${{ matrix.provider-agent.file }}
14+
15+ runs-on : ubuntu-latest
16+
17+ strategy :
18+ matrix :
19+ provider-agent :
20+ - dir : cvmassistants/secretprovider/secret-provider-agent/src
21+ file : secret_provider_agent.c
22+ - dir : cvmassistants/keyprovider/key-provider-agent/src
23+ file : key_provider_agent.c
24+
25+ steps :
26+ - uses : actions/checkout@v4
27+
28+ - name : Install tools directly
29+ run : |
30+ sudo apt-get update
31+ sudo apt-get install -y clang-format cppcheck
32+
33+ - name : Check if file changed
34+ id : changed
35+ uses : tj-actions/changed-files@v47
36+ with :
37+ files : ${{ matrix.provider-agent.dir }}/${{ matrix.provider-agent.file }}
38+
39+ - name : clang-format scan ${{ matrix.provider-agent.file }}
40+ if : steps.changed.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
41+ working-directory : ${{ matrix.provider-agent.dir }}
42+ run : |
43+ clang-format --dry-run -style=llvm --Werror ${{ matrix.provider-agent.file }}
44+
45+ - name : cppcheck scan ${{ matrix.provider-agent.file }}
46+ if : steps.changed.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
47+ working-directory : ${{ matrix.provider-agent.dir }}
48+ run : | # enable all checks and suppress missing include system since RATS-TLS dependencies are not included in the repo
49+ cppcheck --enable=all --suppress=missingIncludeSystem --error-exitcode=1 ${{ matrix.provider-agent.file }}
You can’t perform that action at this time.
0 commit comments