Skip to content

Commit de36741

Browse files
Mrassimoclaude
andcommitted
Fix Windows CI test failures
- Split "Verify test files exist" step for Unix and Windows platforms - Use 'dir' command on Windows instead of 'ls -la' - Fix artifact upload paths for Windows (use explicit temp path) - Separate artifact upload steps for Windows and Unix - Update test runner to handle Windows temp directory correctly This should resolve the Windows test failures in GitHub Actions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bac895c commit de36741

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,23 @@ jobs:
2929
- name: Install dependencies
3030
run: npm ci
3131

32-
- name: Verify test files exist
32+
- name: Verify test files exist (Unix)
33+
if: runner.os != 'Windows'
3334
run: |
3435
echo "Checking test files..."
3536
ls -la tests/unit/
3637
ls -la tests/tui/
3738
ls -la tests/fixtures/
3839
40+
- name: Verify test files exist (Windows)
41+
if: runner.os == 'Windows'
42+
run: |
43+
echo "Checking test files..."
44+
dir tests\unit\
45+
dir tests\tui\
46+
dir tests\fixtures\
47+
shell: cmd
48+
3949
- name: Run comprehensive test suite
4050
run: node tests/run_all_tests.js
4151
timeout-minutes: 10
@@ -59,13 +69,24 @@ jobs:
5969
if: runner.os != 'Windows'
6070
run: mkdir -p /tmp/datapilot-tests
6171

62-
- name: Upload test artifacts
63-
if: always()
72+
- name: Upload test artifacts (Windows)
73+
if: runner.os == 'Windows' && always()
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: test-outputs-${{ matrix.os }}-${{ matrix.node-version }}
77+
path: |
78+
C:\Users\runneradmin\AppData\Local\Temp\*_test.txt
79+
C:\Users\runneradmin\AppData\Local\Temp\datapilot-tests\*
80+
retention-days: 7
81+
if-no-files-found: warn
82+
83+
- name: Upload test artifacts (Unix)
84+
if: runner.os != 'Windows' && always()
6485
uses: actions/upload-artifact@v4
6586
with:
6687
name: test-outputs-${{ matrix.os }}-${{ matrix.node-version }}
6788
path: |
68-
${{ runner.os == 'Windows' && '$env:TEMP' || '/tmp' }}/*_test.txt
69-
${{ runner.os == 'Windows' && '$env:TEMP' || '/tmp' }}/datapilot-tests/*
89+
/tmp/*_test.txt
90+
/tmp/datapilot-tests/*
7091
retention-days: 7
7192
if-no-files-found: warn

tests/run_all_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function main() {
8686
// Run command tests with small fixture
8787
log('\n🔧 Command Tests', 'yellow');
8888
const testFile = path.join(__dirname, 'fixtures/test_sales.csv');
89-
const outputDir = process.platform === 'win32' ? process.env.TEMP : '/tmp';
89+
const outputDir = process.platform === 'win32' ? process.env.TEMP || 'C:\\Users\\runneradmin\\AppData\\Local\\Temp' : '/tmp';
9090

9191
results.push(await runTest('EDA Command', 'node', [
9292
'bin/datapilot.js', 'eda', testFile,

0 commit comments

Comments
 (0)