Skip to content

bump: update scala-library, scala-reflect from 2.13.10 to 2.13.11 (#4… #883

bump: update scala-library, scala-reflect from 2.13.10 to 2.13.11 (#4…

bump: update scala-library, scala-reflect from 2.13.10 to 2.13.11 (#4… #883

name: Validate and test
on:
pull_request:
push:
branches: [ main ]
tags-ignore: [ v* ]
permissions:
contents: read
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
formatting-check:
name: Checks
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Cache Coursier cache
uses: coursier/[email protected]
- name: Set up JDK 17
uses: coursier/[email protected]
with:
jvm: temurin:1.17
- name: Cache Build Target
uses: actions/[email protected]
with:
path: project/**/target
key: build-target-${{ hashFiles('**/*.sbt', 'project/build.properties', 'project/**/*.scala') }}
- name: Autoformat
run: sbt +headerCreateAll +scalariformFormat +test:scalariformFormat
- name: Check for missing formatting
run: git diff --exit-code --color
compile-and-test:
name: Compile and test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: # align with publish-test-reports.yml
SCALA_VERSION: [2.12, 2.13, 3.2]
JDK_VERSION: ["1.8", "1.11", "1.17"]
include:
- JDK_VERSION: 1.8
JVM_NAME: temurin:1.8
extraOpts: '-J-Xmx2048M'
- JDK_VERSION: 1.11
JVM_NAME: temurin:1.11
extraOpts: ''
- JDK_VERSION: 1.17
JVM_NAME: temurin:1.17
extraOpts: ''
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Cache Coursier cache
uses: coursier/[email protected]
- name: Set up JDK ${{ matrix.JDK_VERSION }}
uses: coursier/[email protected]
with:
jvm: ${{ matrix.JVM_NAME }}
- name: Cache Build Target
uses: actions/[email protected]
with:
path: project/**/target
key: build-target-${{ hashFiles('**/*.sbt', 'project/build.properties', 'project/**/*.scala') }}
- name: Compile everything
run: sbt ++${{ matrix.SCALA_VERSION }} Test/compile ${{ matrix.extraOpts }}
# Quick testing for PR validation
- name: Validate pull request for JDK ${{ matrix.JDK_VERSION }}, Scala ${{ matrix.SCALA_VERSION }}
if: ${{ github.event_name == 'pull_request' }}
run: sbt -Dakka.http.parallelExecution=false -Dakka.test.timefactor=2 ++${{ matrix.SCALA_VERSION }} validatePullRequest ${{ matrix.extraOpts }}
# Full testing for pushes
- name: Run all tests JDK ${{ matrix.JDK_VERSION }}, Scala ${{ matrix.SCALA_VERSION }}
if: ${{ github.event_name == 'push' }}
run: sbt -Dakka.http.parallelExecution=false -Dakka.test.timefactor=2 ++${{ matrix.SCALA_VERSION }} mimaReportBinaryIssues test ${{ matrix.extraOpts }}
- name: Upload test results
uses: actions/[email protected]
if: success() || failure() # run this step even if previous step failed
with:
name: 'test-results-${{ matrix.JDK_VERSION }}-${{ matrix.SCALA_VERSION }}'
path: '**/target/test-reports/*.xml'