@@ -113,13 +113,46 @@ jobs:
113113 - name : Test plotly and plotly_static
114114 shell : bash
115115 run : |
116+ echo "=== Platform Information ==="
117+ echo "OS: $(uname -a)"
118+ echo "Architecture: $(uname -m)"
119+ echo "Current directory: $(pwd)"
120+
121+ echo "=== Checking for existing processes ==="
122+ ps aux | grep -E "(chromedriver|geckodriver|firefox|chrome)" || echo "No browser processes found"
123+
124+ echo "=== Checking port availability ==="
125+ netstat -an | grep -E ":(4444|4445|4446|4447|4448|4449|4450)" || echo "No WebDriver ports in use"
126+
127+ echo "=== Running tests ==="
116128 if [ "${{ matrix.browser }}" = "firefox" ]; then
117- cargo test -p plotly --features static_export_default --lib
118- cargo test -p plotly_static --features geckodriver,webdriver_download
129+ echo "Testing with Firefox/geckodriver..."
130+ echo "=== Firefox Environment Check ==="
131+ echo "Firefox version: $(firefox --version 2>/dev/null || echo 'Firefox not found in PATH')"
132+ echo "geckodriver version: $(geckodriver --version 2>/dev/null || echo 'geckodriver not found in PATH')"
133+ echo "Available memory: $(free -h 2>/dev/null || echo 'free command not available')"
134+ echo "Available disk space: $(df -h . 2>/dev/null || echo 'df command not available')"
135+
136+ echo "=== Testing plotly with Firefox ==="
137+ timeout 600 cargo test -p plotly --features static_export_default --lib -- --nocapture
138+
139+ echo "=== Testing plotly_static with Firefox ==="
140+ timeout 600 cargo test -p plotly_static --features geckodriver,webdriver_download -- --nocapture
119141 else
120- cargo test -p plotly --features static_export_chromedriver,static_export_downloader --lib
121- cargo test -p plotly_static --features chromedriver,webdriver_download
142+ echo "Testing with Chrome/chromedriver..."
143+ echo "=== Chrome Environment Check ==="
144+ echo "Chrome version: $(google-chrome --version 2>/dev/null || echo 'Chrome not found in PATH')"
145+ echo "chromedriver version: $(chromedriver --version 2>/dev/null || echo 'chromedriver not found in PATH')"
146+
147+ timeout 600 cargo test -p plotly --features static_export_chromedriver,static_export_downloader --lib -- --nocapture
148+ timeout 600 cargo test -p plotly_static --features chromedriver,webdriver_download -- --nocapture
122149 fi
150+
151+ echo "=== Cleanup after tests ==="
152+ pkill -f chromedriver || echo "No chromedriver processes to kill"
153+ pkill -f geckodriver || echo "No geckodriver processes to kill"
154+ pkill -f firefox || echo "No firefox processes to kill"
155+ pkill -f chrome || echo "No chrome processes to kill"
123156
124157 test-macos-compatibility :
125158 name : Test macOS Compatibility
@@ -186,6 +219,15 @@ jobs:
186219
187220 echo "=== Testing user data directory management ==="
188221 cargo test -p plotly_static --features chromedriver,webdriver_download --lib macos_tests::macos_tests::test_user_data_directory_management -- --nocapture || echo "User data directory management test failed"
222+
223+ echo "=== Testing PDF debugging ==="
224+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib macos_tests::macos_tests::test_pdf_debugging_macos -- --nocapture || echo "PDF debugging test failed"
225+
226+ echo "=== Testing PDF with alternative flags ==="
227+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib macos_tests::macos_tests::test_pdf_with_alternative_flags -- --nocapture || echo "PDF alternative flags test failed"
228+
229+ echo "=== Testing html2pdf library availability ==="
230+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib macos_tests::macos_tests::test_html2pdf_library_loading -- --nocapture || echo "html2pdf library test failed"
189231
190232 - name : Run all plotly_static tests on macOS
191233 run : |
@@ -214,6 +256,106 @@ jobs:
214256 pkill -f chromedriver || echo "No chromedriver processes to kill"
215257 pkill -f "Google Chrome" || echo "No Chrome processes to kill"
216258
259+ test-windows-compatibility :
260+ name : Test Windows Compatibility
261+ runs-on : windows-latest
262+ steps :
263+ - uses : actions/checkout@v4
264+
265+ - name : Setup Chrome
266+ uses : browser-actions/setup-chrome@v1
267+ with :
268+ chrome-version : ' latest'
269+ install-chromedriver : true
270+
271+ - uses : dtolnay/rust-toolchain@stable
272+
273+ - name : Test Chrome and chromedriver installation
274+ shell : cmd
275+ run : |
276+ echo "=== System Information ==="
277+ echo "OS: %OS%"
278+ echo "Architecture: %PROCESSOR_ARCHITECTURE%"
279+ echo "PATH: %PATH%"
280+ echo "Current user: %USERNAME%"
281+ echo "Home directory: %USERPROFILE%"
282+
283+ echo "=== Chrome Installation Check ==="
284+ dir "C:\Program Files\Google\Chrome\Application\chrome.exe" 2>nul || echo "Chrome not found in Program Files"
285+ where google-chrome 2>nul || echo "Chrome not found in PATH"
286+ google-chrome --version 2>nul || echo "Chrome version check failed"
287+
288+ echo "=== chromedriver Installation Check ==="
289+ chromedriver --version 2>nul || echo "chromedriver not found in PATH"
290+ dir "C:\Program Files\Google\Chrome\Application\chromedriver.exe" 2>nul || echo "chromedriver not found in Program Files"
291+
292+ echo "=== Environment Variables ==="
293+ echo "WEBDRIVER_PATH: %WEBDRIVER_PATH%"
294+ echo "CHROMEDRIVER_PATH: %CHROMEDRIVER_PATH%"
295+ echo "CHROME_PATH: %CHROME_PATH%"
296+
297+ - name : Run Windows-specific tests
298+ shell : cmd
299+ run : |
300+ echo "Running Windows compatibility tests..."
301+ echo "Current directory: %CD%"
302+ echo "Rust version: %RUST_VERSION%"
303+ echo "Cargo version: %CARGO_VERSION%"
304+
305+ echo "=== Testing Chrome installation ==="
306+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_chrome_installation -- --nocapture
307+
308+ echo "=== Testing chromedriver installation ==="
309+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_chromedriver_installation -- --nocapture
310+
311+ echo "=== Testing static exporter creation ==="
312+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_static_exporter_creation_windows -- --nocapture
313+
314+ echo "=== Testing basic PNG export ==="
315+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_basic_png_export_windows -- --nocapture
316+
317+ echo "=== Testing Windows Chrome flags ==="
318+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_windows_chrome_flags -- --nocapture
319+
320+ echo "=== Testing user data directory management ==="
321+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_user_data_directory_management -- --nocapture
322+
323+ echo "=== Testing PDF debugging ==="
324+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_pdf_debugging_windows -- --nocapture
325+
326+ echo "=== Testing PDF with alternative flags ==="
327+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib windows_tests::windows_tests::test_pdf_with_alternative_flags -- --nocapture
328+
329+ - name : Run all plotly_static tests on Windows
330+ shell : cmd
331+ run : |
332+ echo "Running all plotly_static tests on Windows..."
333+ echo "Checking for existing chromedriver processes before tests..."
334+ tasklist /FI "IMAGENAME eq chromedriver.exe" 2>nul || echo "No chromedriver processes found"
335+
336+ echo "=== Running tests ==="
337+ cargo test -p plotly_static --features chromedriver,webdriver_download --lib -- --nocapture
338+
339+ echo "Checking for chromedriver processes after tests..."
340+ tasklist /FI "IMAGENAME eq chromedriver.exe" 2>nul || echo "No chromedriver processes found"
341+
342+ - name : Test plotly with static export on Windows
343+ shell : cmd
344+ run : |
345+ echo "Testing plotly with static export on Windows..."
346+ echo "Checking for port conflicts before tests..."
347+ netstat -an | findstr ":4444" || echo "Port 4444 is free"
348+ netstat -an | findstr ":4445" || echo "Port 4445 is free"
349+ netstat -an | findstr ":4446" || echo "Port 4446 is free"
350+ netstat -an | findstr ":4447" || echo "Port 4447 is free"
351+
352+ echo "=== Running plotly static export tests ==="
353+ cargo test -p plotly --features static_export_chromedriver,static_export_downloader --lib -- --nocapture
354+
355+ echo "Cleaning up after tests..."
356+ taskkill /F /IM chromedriver.exe 2>nul || echo "No chromedriver processes to kill"
357+ taskkill /F /IM chrome.exe 2>nul || echo "No Chrome processes to kill"
358+
217359 code-coverage :
218360 name : Code Coverage
219361 runs-on : ubuntu-latest
0 commit comments