Skip to content

Commit f8878d0

Browse files
author
Vahid Tavanashad
committed
use powershell
1 parent 098528d commit f8878d0

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

.github/workflows/conda-package.yml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -383,18 +383,14 @@ jobs:
383383
384384
- name: Run tests
385385
if: env.rerun-tests-on-failure != 'true'
386+
shell: pwsh
386387
run: |
387-
@echo on
388-
set matrix_python=${{ matrix.python }}
389-
set python_ver_test_all_dtypes=${{ env.python-ver-test-all-dtypes }}
390-
set package_name=${{ env.package-name }}
391-
392-
if "%matrix_python%" == "%python_ver_test_all_dtypes%" (
393-
set DPNP_TEST_ALL_INT_TYPES=1
394-
python -m pytest -ra --pyargs %package_name%.tests
395-
) else (
396-
python -m pytest -n auto -ra --pyargs %package_name%.tests
397-
)
388+
if (${{ matrix.python }} -eq ${{ env.python-ver-test-all-dtypes }}) {
389+
$env:DPNP_TEST_ALL_INT_TYPES=1
390+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
391+
} else {
392+
python -m pytest -n auto -ra --pyargs ${{ env.package-name }}.tests
393+
}
398394
399395
- name: Run tests
400396
if: env.rerun-tests-on-failure == 'true'
@@ -404,18 +400,14 @@ jobs:
404400
timeout_minutes: ${{ env.rerun-tests-timeout }}
405401
max_attempts: ${{ env.rerun-tests-max-attempts }}
406402
retry_on: any
403+
shell: pwsh
407404
command: |
408-
@echo on
409-
set matrix_python=${{ matrix.python }}
410-
set python_ver_test_all_dtypes=${{ env.python-ver-test-all-dtypes }}
411-
set package_name=${{ env.package-name }}
412-
413-
if "%matrix_python%" == "%python_ver_test_all_dtypes%" (
414-
set DPNP_TEST_ALL_INT_TYPES=1
415-
python -m pytest -ra --pyargs %package_name%.tests
416-
) else (
417-
python -m pytest -n auto -ra --pyargs %package_name%.tests
418-
)
405+
if ( ${{ matrix.python }} -eq ${{ env.python-ver-test-all-dtypes }} ) {
406+
$env:DPNP_TEST_ALL_INT_TYPES=1
407+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
408+
} else {
409+
python -m pytest -n auto -ra --pyargs ${{ env.package-name }}.tests
410+
}
419411
420412
upload:
421413
name: Upload

0 commit comments

Comments
 (0)