Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add tests for multiple versions of pyspark #111

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/actions/setup-poetry-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ inputs:
required: false
description: "The python version to use"
default: "3.11"
pyspark-version:
required: false
description: "The pyspark version to use"
default: "3.5.1"
with-docs:
required: false
description: "Install the docs dependency group"
default: 'false'


runs:
using: "composite"
steps:
Expand Down Expand Up @@ -40,7 +43,7 @@ runs:
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.with-docs }}-${{ hashFiles('poetry.lock') }}
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.pyspark-version }}-${{ inputs.with-docs }}-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: |
Expand All @@ -49,5 +52,12 @@ runs:
else
poetry install --no-interaction
fi
poetry run pip install pyspark==${{ inputs.pyspark-version }}
shell: bash
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Print python and pyspark version
run: |
poetry run python --version
poetry run pyspark --version
shell: bash
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [opened, synchronize, reopened]
push:
branches: [main]
workflow_dispatch:

jobs:
quality:
Expand All @@ -27,6 +28,14 @@ jobs:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
pyspark-version: ["3.4.3", "3.5.1"]
include:
- python-version: "3.8"
pyspark-version: "3.3.4"
- python-version: "3.9"
pyspark-version: "3.3.4"
- python-version: "3.10"
pyspark-version: "3.3.4"
fail-fast: false
defaults:
run:
Expand All @@ -39,6 +48,7 @@ jobs:
uses: ./.github/actions/setup-poetry-env
with:
python-version: ${{ matrix.python-version }}
pyspark-version: ${{ matrix.pyspark-version }}

- name: Run tests
run: poetry run pytest tests
Expand Down
Loading