Skip to content

Fix default CPPCheck argument for suppressing missing includes. #265

Fix default CPPCheck argument for suppressing missing includes.

Fix default CPPCheck argument for suppressing missing includes. #265

Workflow file for this run

name: Test Action
on:
push:
branches:
- master
pull_request:
jobs:
check:
name: Test Action
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.0
- name: Test the action
shell: bash
run: |
git config --global user.email ${{ secrets.USER_EMAIL }}
git config --global user.name ${{ secrets.USER_NAME }}
if [ ${GITHUB_EVENT_NAME} = 'push' ]
then
BRANCH_NAME=${GITHUB_REF_NAME}
else
BRANCH_NAME=${GITHUB_HEAD_REF}
fi
git clone "https://${{secrets.TOKEN}}@github.com/JacobDomagala/TestRepo.git"
cd TestRepo
python ./switch_sa_branch.py -br=$BRANCH_NAME
git diff --quiet && git diff --staged --quiet || git commit -am"Update branch name: ($BRANCH_NAME)"
git push
# test PR (CMake)
git checkout test-static-analysis
git commit -as --amend --no-edit
git push -f
# test PR (non CMake)
git checkout test-sa-without-cmake
git commit -as --amend --no-edit
git push -f
# test pull_request_target
git clone "https://${{secrets.TOKEN}}@github.com/JacobDTest/TestRepo.git"
cd TestRepo
git checkout test-branch-fork
git commit -as --amend --no-edit
git push -f
- name: Output results (PR)
if: github.event_name == 'pull_request'
uses: mshick/add-pr-comment@v2
with:
message: |
## Test Action results
***
### [Result for push](https://github.com/JacobDomagala/TestRepo/actions/workflows/test.yml?query=branch%3Amain)
***
### [Result for pull_request (CMake)](https://github.com/JacobDomagala/TestRepo/pull/3#issuecomment-1404081176)
***
### [Result for pull_request (non CMake)](https://github.com/JacobDomagala/TestRepo/pull/3#issuecomment-1404102205)
***
### [Result for pull_request_target (CMake)](https://github.com/JacobDomagala/TestRepo/pull/7#issuecomment-1404081052)
***
### [Result for pull_request_target (non CMake)](https://github.com/JacobDomagala/TestRepo/pull/7#issuecomment-1404101648)