diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml new file mode 100644 index 000000000..394147122 --- /dev/null +++ b/.github/workflows/formatting.yml @@ -0,0 +1,37 @@ +name: Pull Request Quality Assurance +on: + pull_request: + +jobs: + ruff-check: + name: Ruff linter check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ChartBoost/ruff-action@main + ruff-format-check: + name: Ruff formatting check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ChartBoost/ruff-action@main + with: + args: "format --check" + + clang-format-check: + name: C/C++ code format checking + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + path: + - "src" + - "lib" + + steps: + - uses: actions/checkout@v4 + - uses: jidicula/clang-format-action@main + with: + clang-format-version: "18" + check-path: ${{ matrix.path }}