Files
mod-playerbots/.github/workflows/codestyle_cpp.yml
kadeshar 1401657a6d Modify action to workaround github settings (#2167)
Github action modification
2026-02-24 22:10:09 +01:00

51 lines
1.3 KiB
YAML

name: C++ Codestyle
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
concurrency:
group: "codestyle-cppcheck-${{ github.event.pull_request.number }}"
cancel-in-progress: true
jobs:
triage:
runs-on: ubuntu-latest
name: C++
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
cpp:
- 'src/**'
- '!README.md'
- '!docs/**'
- name: Setup python
if: steps.filter.outputs.cpp == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: AzerothCore codestyle
if: steps.filter.outputs.cpp == 'true'
run: python ./apps/codestyle/codestyle-cpp.py
- name: C++ Advanced
if: steps.filter.outputs.cpp == 'true'
run: |
sudo apt update -y
sudo apt install -y cppcheck
cppcheck --force --inline-suppr --suppressions-list=./.suppress.cppcheck src/ --output-file=report.txt
if [ -s report.txt ]; then # if file is not empty
cat report.txt
exit 1 # let github action fails
fi