diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 10deae7..b9ccdb3 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -15,10 +15,10 @@ jobs: - name: Install dependencies run: | - sudo apt-get install -y build-essential python-dev-is-python3 python3-numpy python3-pytest + sudo apt-get install -y build-essential python-dev-is-python3 python3-numpy python3-pytest cppcheck - name: Build library - run: make PYTHON=python + run: make c PYTHON=python - name: Run library tests run: make test PYTHON=python @@ -42,3 +42,19 @@ jobs: uses: actions/upload-pages-artifact@v3 with: path: docs/build/html/ + + cppcheck: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run cppcheck + run: cppcheck --enable=all --suppress=missingIncludeSystem -I src/ . + + - name: Publish cppcheck report + uses: mikeal/publish-to-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH_NAME: 'main' diff --git a/README.md b/README.md index 10987f7..2376e27 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ [![Python 3](http://img.shields.io/badge/python-3-blue.svg)](https://docs.python.org/3/) [![gcc](https://img.shields.io/badge/-C++-blue?logo=cplusplus)](https://gcc.gnu.org/) +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/theochem/matrix-permanent/actions/workflows/pull_request.yml) +[![GNU GPLv3](https://img.shields.io/badge/license-%20%20GNU%20GPLv3%20-green?style=plastic)](https://www.gnu.org/licenses/gpl-3.0.en.html) + # Permanent