diff options
Diffstat (limited to '.github/workflows/format_check.yml')
| -rw-r--r-- | .github/workflows/format_check.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml new file mode 100644 index 0000000..db94ee0 --- /dev/null +++ b/.github/workflows/format_check.yml @@ -0,0 +1,32 @@ +name: Format Check + +on: + pull_request: + +jobs: + check-format: + runs-on: tgrogers-raid + steps: + - uses: actions/checkout@v4 + - name: Check code formatting + run: | + # Run the formatter to see if it would make any changes + /bin/bash ./format-code.sh + + # Check if there are any uncommitted changes + if git diff --quiet; then + echo "✅ Code is properly formatted" + else + echo "❌ Code formatting check failed. The following files need formatting:" + git diff --name-only + echo "" + echo "Please run the formatter locally and commit the changes:" + echo "/bin/bash ./format-code.sh" + exit 1 + fi + + # skip the runs in PRs. Will run in the merge queue + CI-Success: + runs-on: ubuntu-latest + steps: + - run: echo "CI skipped. Will run in the merge queue"
\ No newline at end of file |
