Skip to content

Commit 61b68ac

Browse files
Run tests from {github.workspace} and use pytest for public CI
1 parent 80e7d72 commit 61b68ac

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

.github/workflows/conda-package.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,11 @@ jobs:
259259
python -c "import dpnp, dpctl; dpctl.lsplatform()"
260260
python -c "import dpnp; print(dpnp.__version__)"
261261
262-
- name: Create test temp dir
263-
# create temporary empty folder to runs tests from
264-
# https://github.com/pytest-dev/pytest/issues/11904
265-
run: mkdir -p ${GITHUB_WORKSPACE}/test_tmp
266-
267262
- name: Run tests
268263
if: env.RERUN_TESTS_ON_FAILURE != 'true'
269264
run: |
270-
python -m pytest -q -ra --disable-warnings -vv --pyargs ${{ env.TEST_SCOPE }}
271-
working-directory: ${{ github.workspace }}/test_tmp
265+
python -m pytest -ra -v --disable-warnings --pyargs ${{ env.TEST_SCOPE }}
266+
working-directory: ${{ github.workspace }}
272267

273268
- name: Run tests
274269
if: env.RERUN_TESTS_ON_FAILURE == 'true'
@@ -282,8 +277,8 @@ jobs:
282277
command: |
283278
. $CONDA/etc/profile.d/conda.sh
284279
conda activate ${{ env.TEST_ENV_NAME }}
285-
cd ${{ github.workspace }}/test_tmp
286-
python -m pytest -q -ra --disable-warnings -vv --pyargs ${{ env.TEST_SCOPE }}
280+
cd ${{ github.workspace }}
281+
pytest -ra -v --disable-warnings --pyargs ${{ env.TEST_SCOPE }}
287282
288283
test_windows:
289284
name: Test ['windows-2019', python='${{ matrix.python }}']
@@ -419,17 +414,11 @@ jobs:
419414
python -c "import dpnp, dpctl; dpctl.lsplatform()"
420415
python -c "import dpnp; print(dpnp.__version__)"
421416
422-
- name: Create empty temporary directory to run tests from
423-
# create temporary empty folder to runs tests from
424-
# https://github.com/pytest-dev/pytest/issues/11904
425-
run: |
426-
mkdir "${{ env.workdir }}\test_tmp"
427-
428417
- name: Run tests
429418
if: env.RERUN_TESTS_ON_FAILURE != 'true'
430419
run: |
431-
python -m pytest -q -ra --disable-warnings -vv --pyargs ${{ env.TEST_SCOPE }}
432-
working-directory: ${{ env.workdir }}\test_tmp
420+
pytest -ra -v --disable-warnings --pyargs ${{ env.TEST_SCOPE }}
421+
working-directory: ${{ env.workdir }}
433422

434423
- name: Run tests
435424
if: env.RERUN_TESTS_ON_FAILURE == 'true'
@@ -442,8 +431,8 @@ jobs:
442431
retry_on: any
443432
command: >-
444433
mamba activate ${{ env.TEST_ENV_NAME }}
445-
& cd ${{ env.workdir }}\test_tmp
446-
& python -m pytest -q -ra --disable-warnings -vv --pyargs ${{ env.TEST_SCOPE }}
434+
& cd ${{ env.workdir }}
435+
& pytest -ra -v --disable-warnings --pyargs ${{ env.TEST_SCOPE }}
447436
448437
upload:
449438
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']

0 commit comments

Comments
 (0)