-
Notifications
You must be signed in to change notification settings - Fork 323
39 lines (36 loc) · 1.19 KB
/
formatting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Code Formatting Check
on:
push:
branches: [develop, "release/*"]
pull_request:
branches: ["*"]
env:
# Please ensure that this is in sync with graalVersion in build.sbt
javaVersion: 21.0.2
# Please ensure that this is in sync with project/build.properties
sbtVersion: 1.9.7
jobs:
test_formatting:
name: Test Formatting
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
# No need to run it on multiple distros, result should be the same
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup GraalVM Environment
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ env.javaVersion }}
distribution: graalvm-community
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set Up SBT
shell: bash
run: |
curl --retry 4 --retry-connrefused -fsSL -o sbt.tgz https://github.com/sbt/sbt/releases/download/v${{env.sbtVersion}}/sbt-${{env.sbtVersion}}.tgz
tar -xzf sbt.tgz
echo $GITHUB_WORKSPACE/sbt/bin/ >> $GITHUB_PATH
- name: Check Code Formatting
run: |
sbt "scalafmtCheckAll; javafmtCheckAll; scalafmtSbtCheck"