Skip to content

Add CI tests on latest version of Spark #1

Add CI tests on latest version of Spark

Add CI tests on latest version of Spark #1

Workflow file for this run

name: CI checks on PR
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- pyspark-version: 3.4.0
pip-packages: "pyspark==3.4.0"
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8' # Supported by Spark 2.x & 3.x
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.6.1
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: make install_test
if: steps.cache.outputs.cache-hit != 'true'
- name: Change PySpark to version ${{ matrix.pyspark-version }}
env:
PIP_PACKAGES: ${{ matrix.pip-packages }}
run: poetry run pip install $PIP_PACKAGES # Using pip shouldn't mess up poetry cache
- name: Run tests with pytest against PySpark ${{ matrix.pyspark-version }}
run: make test