Skip to content

Commit

Permalink
feat: add cppcheck to the pipeline (UNICT-Quality-Development#203)
Browse files Browse the repository at this point in the history
* feat: add cppcheck to the pipeline

* chore: update cpp check ci

* chore: check cpp check pipeline

* fix: cpp check

* wip

* wip

* fix: pipeline
  • Loading branch information
Helias authored Oct 17, 2023
1 parent 7572cbf commit f8f4676
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI

on:
push:
branches:
- '**'
pull_request:
branches: [main]

Expand All @@ -15,4 +12,4 @@ jobs:
- name: install g++
run: sudo apt install -y g++
- name: check build
run: source ./compile.sh
run: source ./compile.sh
26 changes: 26 additions & 0 deletions .github/workflows/cpp-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: cpp-check

on:
pull_request:
branches:
- "main"

jobs:
cpp-check:
strategy:
fail-fast: false
runs-on: [ubuntu-22.04]
name: cpp check
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y cppcheck
- name: cpp check
run: |
cppcheck --force --inline-suppr --output-file=report.txt exercises/
if [ -s report.txt ]; then # if file is not empty
cat report.txt
exit 1 # let github action fails
fi
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.vscode/
.vscode/
report.txt

0 comments on commit f8f4676

Please sign in to comment.