From 83f960cec5bb6f8998bb21dba914cac88dd6853c Mon Sep 17 00:00:00 2001 From: utam0k Date: Sun, 16 Jun 2024 15:34:23 +0900 Subject: [PATCH] ci: Add a github actions workflow for lint Signed-off-by: utam0k --- .github/workflows/lint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..9b410fa72 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Check Code Formatting + +on: [push, pull_request] + +jobs: + check-format: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run make fmt + run: make -C schema fmt + + - name: Check for changes + run: | + if [[ -n $(git status --porcelain) ]]; then + echo "There are unformatted files." + exit 1 + else + echo "All files are properly formatted." + fi