OpenMC/.github/workflows/format-check.yml
Micah Gale 539f58d3b1
Changed CI to use latest actions to get away from the Node 16 deprecation. (#2912)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2024-03-13 11:08:13 -05:00

32 lines
811 B
YAML

name: C++ Format Check
on:
# allow workflow to be run manually
workflow_dispatch:
pull_request:
branches:
- develop
- master
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
files-changed-only: true
tidy-checks: '-*'
version: '15' # clang-format version
file-annotations: true
step-summary: true
extensions: 'cpp,h'
- name: Failure Check
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1