From 19b212af386f3850b95bd558f20bba05f4f8cfbc Mon Sep 17 00:00:00 2001 From: David An Date: Fri, 25 Oct 2024 14:53:35 -0400 Subject: [PATCH] enforce scalafmt in github actions --- .git-blame-ignore-revs | 4 ++++ .github/workflows/format.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .git-blame-ignore-revs create mode 100644 .github/workflows/format.yaml diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..fb495459 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,4 @@ +# .git-blame-ignore-revs + +# scalafmt mass change +3487e7a60194a66886572c899a6a93d7355dc376 diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 00000000..026d95e8 --- /dev/null +++ b/.github/workflows/format.yaml @@ -0,0 +1,28 @@ +name: Check formatting for modified files with scalafmt + +on: + pull_request: + paths-ignore: ['**.md'] + +jobs: + format: + + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + cache: sbt + + - name: Check formatting for modified files + run: | + sbt scalafmtCheckAll