mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Update repository condition for C++ job
This commit is contained in:
35
.github/workflows/codestyle_cpp.yml
vendored
Normal file
35
.github/workflows/codestyle_cpp.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: C++ Codestyle
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths:
|
||||
- src/**
|
||||
- "!README.md"
|
||||
- "!docs/**"
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
name: C++
|
||||
if: github.repository == 'mod-playerbots/mod-playerbots' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: AzerothCore codestyle
|
||||
run: python ./apps/codestyle/codestyle-cpp.py
|
||||
- name: C++ Advanced
|
||||
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
|
||||
Reference in New Issue
Block a user