Skip to content

Commit

Permalink
Merge pull request #111 from fpgmaas/chore/test-pyspark
Browse files Browse the repository at this point in the history
chore: add tests for multiple versions of pyspark
  • Loading branch information
SemyonSinchenko authored Jul 29, 2024
2 parents 580631a + 81b8b9e commit d876e24
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
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

0 comments on commit d876e24

Please sign in to comment.