From 02470f560661a64ed4c2b1a6faca6837fea91e4e Mon Sep 17 00:00:00 2001 From: Andreas Argyriou Date: Tue, 1 Mar 2022 17:31:18 +0000 Subject: [PATCH] Set spark env variables in nightly test --- .github/workflows/actions/run-tests/action.yml | 6 ++++++ tox.ini | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/actions/run-tests/action.yml b/.github/workflows/actions/run-tests/action.yml index b26e89fd2e..16f04fbf25 100644 --- a/.github/workflows/actions/run-tests/action.yml +++ b/.github/workflows/actions/run-tests/action.yml @@ -47,6 +47,12 @@ runs: sudo apt-get install -y build-essential libpython3.6 libpython3.7 pip install tox + - name: Set PYSPARK environment variables + shell: bash + run: | + export PYSPARK_DRIVER_PYTHON=$(which python) + export PYSPARK_PYTHON=$(which python) + - name: Run ${{ inputs.test-kind }} tests ('${{ inputs.test-marker }}') shell: bash # '-e py' will use the default 'python' executable found in system path diff --git a/tox.ini b/tox.ini index f90f21c951..15210a7b59 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,9 @@ extras = dev,gpu,examples # with this dependency subset, we should be able to run the test markers: # 1. "spark and not notebook and not spark" (test for spark utilities) # 2. "spark and notebooks and not spark" (tests for notebook using spark) +# passenv is used for the PYSPARK_PYTHON, PYSPARK_DRIVER_PYTHON env variables extras = dev,spark,examples +passenv = * [testenv:all] # i.e: 'pip install recommenders-*.whl[all]'