diff --git a/.github/actions/checks/action.yml b/.github/actions/checks/action.yml new file mode 100644 index 000000000000..bf75189c3476 --- /dev/null +++ b/.github/actions/checks/action.yml @@ -0,0 +1,24 @@ +name: Source Checks +description: Run Various Checks on Source +inputs: + format: + description: Run Clang Format + default: 'false' + spelling: + description: Run Spelling + default: 'false' +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + + - name: Run clang-format style check for C++ Source Files. + if: inputs.format == 'true' + uses: jidicula/clang-format-action@main + with: + clang-format-version: '17' + check-path: 'src' + + - name: Check spelling + if: inputs.spelling == 'true' + uses: crate-ci/typos@master diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml deleted file mode 100644 index dbb962b4fa3c..000000000000 --- a/.github/workflows/clang-format-check.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: clang-format Check -on: [workflow_dispatch] -jobs: - formatting-check: - name: Formatting Check - runs-on: ubuntu-latest - strategy: - matrix: - path: - - 'src' - - 'test' - steps: - - uses: actions/checkout@v4 - - name: Run clang-format style check for C++ Source Files. - uses: jidicula/clang-format-action@main - with: - clang-format-version: '17' - check-path: ${{ matrix.path }} diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml deleted file mode 100644 index 50220d543d5f..000000000000 --- a/.github/workflows/spelling.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Typos -on: [workflow_dispatch] -jobs: - typos: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v4 - - name: Check spelling - uses: crate-ci/typos@master