Skip to content

Commit 624518c

Browse files
authored
ci: Run pyspark constructors via path (#2910)
* ci: Run pyspark constructors via path * add comments * add cron schedule
1 parent 4a5bccb commit 624518c

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/pytest-pyspark.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ name: PyTest PySpark constructor
22

33
on:
44
pull_request:
5-
types: [opened, labeled, synchronize] # Triggers on PR creation, updates, and label changes
5+
paths:
6+
- narwhals/_expression_parsing.py
7+
- narwhals/_spark_like/**
8+
- narwhals/_sql/**
9+
schedule:
10+
- cron: 0 12 * * 0 # Sunday at mid-day
611

712
env:
813
PY_COLORS: 1
@@ -11,10 +16,9 @@ env:
1116
jobs:
1217

1318
pytest-pyspark-constructor:
14-
if: ${{ contains(github.event.pull_request.labels.*.name, 'pyspark') || contains(github.event.pull_request.labels.*.name, 'spark-like') || contains(github.event.pull_request.labels.*.name, 'release')}}
1519
strategy:
1620
matrix:
17-
python-version: ["3.10", "3.11"]
21+
python-version: ["3.11"]
1822
os: [ubuntu-latest]
1923
runs-on: ${{ matrix.os }}
2024
steps:
@@ -39,10 +43,9 @@ jobs:
3943

4044

4145
pytest-pyspark-connect-constructor:
42-
if: ${{ contains(github.event.pull_request.labels.*.name, 'pyspark-connect') || contains(github.event.pull_request.labels.*.name, 'release') }}
4346
strategy:
4447
matrix:
45-
python-version: ["3.10", "3.11"]
48+
python-version: ["3.11"]
4649
os: [ubuntu-latest]
4750
env:
4851
SPARK_VERSION: 3.5.5

narwhals/_expression_parsing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Utilities for expression parsing
22
# Useful for backends which don't have any concept of expressions, such
33
# and pandas or PyArrow.
4+
# ! Any change to this module will trigger the pyspark and pyspark-connect tests in CI
45
from __future__ import annotations
56

67
from enum import Enum, auto

narwhals/_spark_like/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ! Any change to this module will trigger the pyspark and pyspark-connect tests in CI

narwhals/_sql/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ! Any change to this module will trigger the pyspark and pyspark-connect tests in CI

0 commit comments

Comments
 (0)