name: cppcheck

on:
  pull_request:
    types: [opened, reopened, synchronize]
  push:
    branches:
      - master

jobs:
  cppcheck:
    runs-on: ubuntu-22.04

    steps:
      - name: Install dependencies
        run: sudo apt-get update && sudo apt-get install cppcheck

      - uses: actions/checkout@v4

      - name: Run cppcheck
        env:
          ANALYZE: true
        run: $GITHUB_WORKSPACE/.travis.sh
