diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c1b4daf..a304ccb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,10 +24,10 @@ concurrency: jobs: build: - name: Build and Test + name: Test strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04] scala: [2.12, 3, 2.13] java: [corretto@11, corretto@17] project: [rootJS, rootJVM, rootSbtScalafix] @@ -49,15 +49,14 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: - - name: Install sbt - if: contains(runner.os, 'macos') - run: brew install sbt - - name: Checkout current branch (full) uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Setup Java (corretto@11) id: setup-java-corretto-11 if: matrix.java == 'corretto@11' @@ -94,11 +93,11 @@ jobs: run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: Check scalafix lints - if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check' - name: scalaJSLink @@ -109,11 +108,11 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-22.04' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Make target directories @@ -137,19 +136,18 @@ jobs: if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04] java: [corretto@11] runs-on: ${{ matrix.os }} steps: - - name: Install sbt - if: contains(runner.os, 'macos') - run: brew install sbt - - name: Checkout current branch (full) uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Setup Java (corretto@11) id: setup-java-corretto-11 if: matrix.java == 'corretto@11' @@ -255,19 +253,18 @@ jobs: if: github.event.repository.fork == false && github.event_name != 'pull_request' strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04] java: [corretto@11] runs-on: ${{ matrix.os }} steps: - - name: Install sbt - if: contains(runner.os, 'macos') - run: brew install sbt - - name: Checkout current branch (full) uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Setup Java (corretto@11) id: setup-java-corretto-11 if: matrix.java == 'corretto@11'