Skip to content

No xcompile on 4.X for now. #307

No xcompile on 4.X for now.

No xcompile on 4.X for now. #307

name: Build and test
on:
pull_request:
paths:
- '**'
push:
branches:
- '**'
- '!branch-*.*'
jobs:
# Build: build spark-testing-base and run the tests for specified modules.
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- spark: "2.4.8"
java-version: "11"
distribution: "temurin"
- spark: "3.0.2"
java-version: "11"
distribution: "temurin"
- spark: "3.1.2"
java-version: "11"
distribution: "temurin"
- spark: "3.2.2"
java-version: "11"
distribution: "temurin"
- spark: "3.3.1"
java-version: "11"
distribution: "temurin"
- spark: "3.4.0"
java-version: "11"
distribution: "temurin"
- spark: "3.4.0"
java-version: "17"
distribution: "temurin"
- spark: "4.0.0"
java-version: "17"
distribution: "temurin"
- spark: "4.1.0"
java-version: "17"
distribution: "temurin"
env:
SPARK_VERSION: ${{ matrix.spark }}
steps:
- name: Checkout spark-testing-base
uses: actions/checkout@v4.1.1
# In order to fetch changed files
with:
fetch-depth: 0
repository: holdenk/spark-testing-base
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.distribution }}
cache: sbt
- name: Add sbt
uses: sbt/setup-sbt@v1
- name: Cache maven modules
id: cache-maven
uses: actions/cache@v4
env:
cache-name: cache-maven
with:
# maven cache files are stored in `~/.m2` & `~/.ivy2` on Linux/macOS
path: |
~/.m2
~/.ivy2/cache
~/.sbt
~/.cache/coursier
key: ${{ runner.os }}-${{ matrix.java-version }}-${{ matrix.spark }}-build-${{ env.cache-name }}-${{ hashFiles('build.sbt') }}
- name: Run tests
run: SPARK_TESTING=yes ./build/sbt clean +compile +test -DsparkVersion=$SPARK_VERSION