mirror of
https://github.com/enso-org/enso.git
synced 2024-12-24 04:24:01 +03:00
efb39ad91c
Follow-up of recent GraalVM update #7176 that fixes downloading of GraalVM for Mac - instead of "darwin", the releases are now named "macos" # Important Notes Also re-enables the JDK/GraalVM version check as onLoad hook to the `sbt` process. We used to have that check a long time ago. Provides errors like this one if the `sbt` is run with a different JVM version: ``` [error] GraalVM version mismatch - you are running Oracle GraalVM 20.0.1+9.1 but GraalVM 17.0.7 is expected. [error] GraalVM version check failed. ```
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
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: 17.0.7
|
|
# Please ensure that this is in sync with project/build.properties
|
|
sbtVersion: 1.9.0
|
|
|
|
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"
|