update #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- spark-version: 3.4.1 | |
scala-version: 2.12.17 | |
python-version: 3.9 | |
- spark-version: 3.3.3 | |
scala-version: 2.12.15 | |
python-version: 3.9 | |
- spark-version: 3.2.4 | |
scala-version: 2.12.15 | |
python-version: 3.9 | |
runs-on: ubuntu-22.04 | |
env: | |
# define Java options for both official sbt and sbt-extras | |
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
SPARK_VERSION: ${{ matrix.spark-version }} | |
SCALA_VERSION: ${{ matrix.scala-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: olafurpg/setup-scala@v13 | |
with: | |
java-version: "openjdk@1.11" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.ivy2/cache | |
key: sbt-ivy-cache-spark-${{ matrix.spark-version}}-scala-${{ matrix.scala-version }} | |
- name: Assembly | |
run: sbt -v ++${{ matrix.scala-version }} -Dspark.version=${{ matrix.spark-version }} "set test in assembly := {}" assembly | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r ./python/requirements.txt | |
pip install pyspark==${{ matrix.spark-version }} | |
- name: Test | |
run: | | |
export SPARK_HOME=$(python -c "import os; from importlib.util import find_spec; print(os.path.join(os.path.dirname(find_spec('pyspark').origin)))") | |
./python/run-tests.sh |