Skip to content

Commit 75126e1

Browse files
committed
Add Python path
1 parent 159063a commit 75126e1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ jobs:
8181
pip install -r requirements.txt
8282
pip install -r test-requirements.txt
8383
84+
- name: Determine path to installed package
85+
run: |
86+
echo TEST_CONFIG_FILE=$(pwd)/setup.cfg >> $GITHUB_ENV
87+
python3 -c 'import os; print("TEST_HOME=" + os.path.dirname(os.__file__) + "/site-packages/singlestoredb/tests")' >> $GITHUB_ENV
88+
8489
- name: Build sdist
8590
if: runner.os == 'Linux'
8691
run: |
@@ -101,7 +106,7 @@ jobs:
101106
CIBW_ARCHS_MACOS: "universal2"
102107
CIBW_BUILD: "cp39-*"
103108
CIBW_SKIP: "pp* *-musllinux* *-manylinux_i686"
104-
CIBW_TEST_COMMAND: "pytest {project}/singlestoredb/tests/test_basics.py"
109+
CIBW_TEST_COMMAND: "pytest --config-file=${{ env.TEST_CONFIG_FILE }} ${{ env.TEST_HOME }}/test_basics.py"
105110
CIBW_TEST_REQUIRES: "pytest"
106111
CIBW_ENVIRONMENT: "SINGLESTOREDB_URL='mysql://${{ secrets.CLUSTER_USER }}:${{ secrets.CLUSTER_PASSWORD }}@${{ needs.setup-database.outputs.cluster-host }}:3306/${{ needs.setup-database.outputs.cluster-database }}?pure_python=0'"
107112
PYTHONPATH: ${{ github.workspace }}

0 commit comments

Comments
 (0)