From 6efbc12b38c6c1c1e70f33fc251623225a6a7b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kapica?= Date: Sat, 22 Jun 2024 21:39:02 +0200 Subject: [PATCH] Add checking for scalafmt conformance --- .github/workflows/ci.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a3a0612..221b3e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,12 +28,15 @@ jobs: with: sparse-checkout: 'api' - run: "find ./api -maxdepth 1 -mindepth 1 -exec mv {} . \\; && rm -r ./api" + - uses: coursier/cache-action@v6.3 + - uses: VirtusLab/scala-cli-setup@v0.1 - name: Check for scalafmt conformance run: | - curl -fL "https://github.com/VirtusLab/coursier-m1/releases/latest/download/cs-aarch64-pc-linux.gz" | gzip -d > cs - chmod +x cs - cs install scalafmt - ./cs scalafmt --check + scala-cli fmt --check . || ( + echo "To format code run" + echo " scala-cli fmt ." + exit 1 + ) - name: Setup JDK uses: actions/setup-java@v3 with: