From e89a1efb51aa0855d305aaa05d77b27d88a1be59 Mon Sep 17 00:00:00 2001 From: Thijs Broersen Date: Sun, 6 Oct 2024 21:14:02 +0200 Subject: [PATCH] test ternary operator for suffix selection --- .github/workflows/ci.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93e29b5b2..79f978f40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,15 +55,7 @@ jobs: uses: coursier/cache-action@v6 - name: Run ${{ matrix.scala }} ${{ matrix.platform }} tests run: | - SCALA_SUFFIX="" - if [[ ${{ matrix.scala }} == 2.12* ]]; then - SCALA_SUFFIX="212" - elif [[ ${{ matrix.scala }} == 2.13* ]]; then - SCALA_SUFFIX="213" - elif [[ ${{ matrix.scala }} == 3.* ]]; then - SCALA_SUFFIX="3" - fi - sbt test${{ matrix.platform }}${SCALA_SUFFIX} + sbt test${{ matrix.platform }}${{ startsWith(matrix.scala, '2.12') && '212' || (startsWith(matrix.scala, '2.13') && '213' || (startsWith(matrix.scala, '3') && '3' || '')) }} ci: runs-on: ubuntu-22.04