name: CI

on:
  pull_request:
  push:

jobs:
  ci:
    runs-on: ubuntu-latest

    name: Scala v${{ matrix.scala }} / Java v${{ matrix.java }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - java: 8
            scala: 2.13.6
          - java: 11
            scala: 2.13.6
          - java: 16
            scala: 2.13.6

    steps:
      - name: Git checkout
        uses: actions/checkout@v2

      - name: Setup Java and Scala
        uses: olafurpg/setup-scala@v12
        with:
          java-version: adopt@1.${{ matrix.java }}

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: '16'

      - name: Setup Scala.JS
        uses: japgolly/setup-scalajs@v1

      - name: Cache sbt
        uses: coursier/cache-action@v6

      - name: Build and test
        shell: bash
        run: sbt ++${{ matrix.scala }} test 'set scalaJSStage in ThisBuild := FullOptStage' JS/test

      - name: Show JS sizes
        shell: bash
        run: sbt ++${{ matrix.scala }} cmpJsSize jsSizes

name: CI

on:
  pull_request:
  push:

jobs:
  ci:
    runs-on: ubuntu-latest

    name: Scala v${{ matrix.scala }} / Java v${{ matrix.java }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - java: 8
            scala: 2.13.6
          - java: 11
            scala: 2.13.6
          - java: 16
            scala: 2.13.6

    steps:
      - name: Git checkout
        uses: actions/checkout@v2

      - name: Setup Java and Scala
        uses: olafurpg/setup-scala@v12
        with:
          java-version: adopt@1.${{ matrix.java }}

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: '16'

      - name: Setup Scala.JS
        uses: japgolly/setup-scalajs@v1

      - name: Cache sbt
        uses: coursier/cache-action@v6

      - name: Build and test
        shell: bash
        run: sbt ++${{ matrix.scala }} test

      - name: Test fullOptJS
        shell: bash
        run: sbt ++${{ matrix.scala }} 'set ThisBuild / scalaJSStage := FullOptStage' JS/test

      - name: Show JS sizes
        shell: bash
        run: sbt ++${{ matrix.scala }} cmpJsSize jsSizes

Split CI a little more
Split CI a little more
