Skip to content

Commit 1650b32

Browse files
committed
Ensure CI cross-platform directory creation
Added conditional steps in the GitHub Actions workflow to properly create the test directory on both Unix and Windows platforms. This ensures cross-platform compatibility of the directory setup required for running pytest, avoiding any potential errors in the CI process.
1 parent 02ba905 commit 1650b32

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/python-package.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,17 @@ jobs:
4848
run: |
4949
python -m pip install --upgrade pip
5050
if (Test-Path requirements.txt) { pip install -r requirements.txt }
51-
- name: Test with pytest
51+
- name: Create test directory (Unix)
52+
if: matrix.os != 'windows-latest'
5253
run: |
5354
mkdir -p src/tests/data/results
5455
test -d src/tests/data/results || exit 1
56+
57+
- name: Create test directory (Windows)
58+
if: matrix.os == 'windows-latest'
59+
run: |
60+
New-Item -Path "src/tests/data/results" -ItemType Directory -Force
61+
if (-not (Test-Path "src/tests/data/results")) { exit 1 }
62+
- name: Test with pytest
63+
run: |
5564
pytest src/tests/

0 commit comments

Comments
 (0)