From 8bc4844c90e9a3b15f634f2b4f1ec01a4e6ac21c Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Tue, 22 Oct 2024 12:21:16 +0900 Subject: [PATCH] Add a CI for buildifier --- .github/workflows/lint.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/lint.xml diff --git a/.github/workflows/lint.xml b/.github/workflows/lint.xml new file mode 100644 index 000000000..4e220d20f --- /dev/null +++ b/.github/workflows/lint.xml @@ -0,0 +1,31 @@ +name: CI for Lint checks +# https://github.com/google/mozc/blob/master/docs/build_mozc_in_docker.md + +# Run on push. +on: push + +permissions: read-all + +# Prevent previous workflows from running. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + buildifier: + # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md + runs-on: ubuntu-24.04 + timeout-minutes: 20 + + steps: + # Checkout without submodules to exclude third_party code from lint check + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'false' + + - name: Run + working-directory: ./src + run: | + go install github.com/bazelbuild/buildtools/buildifier@latest + $(go env GOPATH)/bin/buildifier --mode=diff -r .