44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Checks
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
run:
|
|
name: Run
|
|
runs-on: ubuntu-22.04
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: src/pg_stat_monitor
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: src/pg_stat_monitor
|
|
|
|
- name: Checkout cppcheck sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: 'danmar/cppcheck'
|
|
ref: '2.13.4'
|
|
path: src/cppcheck
|
|
|
|
- name: Build and install cppcheck
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
cmake --build .
|
|
sudo cmake --install .
|
|
working-directory: src/cppcheck
|
|
|
|
- name: Execute linter check with cppcheck
|
|
run: |
|
|
set -x
|
|
cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:pg_stat_monitor.c --check-config .
|
|
|
|
- name: Check license headers
|
|
uses: apache/skywalking-eyes/header@v0.6.0
|