Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c592421
first attempt at testing
gtheler Jan 22, 2026
b25da5f
actions
gtheler Jan 23, 2026
0d1b057
autodetect package name
gtheler Jan 23, 2026
c420414
free port 8000
gtheler Jan 23, 2026
14df716
do not start php server
gtheler Jan 23, 2026
9780e70
Merge branch 'main' into playwright-tests
gtheler Jan 25, 2026
da365dd
missing mkdir bin
gtheler Jan 25, 2026
2592b29
small improvements
gtheler Jan 25, 2026
42e3752
from apt
gtheler Jan 25, 2026
e63cb8d
fixed yaml
gtheler Jan 25, 2026
abf69b2
feenox is not in ubuntu-latest
gtheler Jan 25, 2026
f28a45e
fixed syntax
gtheler Jan 25, 2026
8c944a5
fixes
gtheler Jan 25, 2026
9bfb22b
apt install python3-gmsh instead of libgmsh-dev
gtheler Jan 25, 2026
ee06fb2
check script
gtheler Jan 26, 2026
49fd015
check
gtheler Jan 26, 2026
e918980
fixes
gtheler Jan 26, 2026
04b0421
Initial plan
Copilot Jan 26, 2026
047ac99
Add test files from playwright-tests branch
Copilot Jan 26, 2026
6a6ac12
Add comprehensive debugging and network logging to Playwright test
Copilot Jan 26, 2026
df8e394
Fix typo in comment
Copilot Jan 26, 2026
152316e
Fix response body consumption issue - don't read response twice
Copilot Jan 26, 2026
e1d44ea
Merge branch 'playwright-tests' into copilot/add-network-logging-debu…
gtheler Jan 26, 2026
8a3f071
trigger workflow
gtheler Jan 26, 2026
5a9f34f
Merge pull request #12 from seamplex/copilot/add-network-logging-debu…
gtheler Jan 26, 2026
a17c686
gmsh min 4.13
gtheler Jan 26, 2026
153ca8b
Merge branch 'playwright-tests' of github.com:seamplex/suncae into pl…
gtheler Jan 26, 2026
878eef5
less verbose deps
gtheler Jan 26, 2026
e820b8e
insert python path
gtheler Jan 26, 2026
32f43eb
missing -q in wget
gtheler Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Playwright Tests

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
playwrigth-standalone:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: yaml

- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y unzip patchelf wget php-cli php-yaml gnuplot

- name: Install SunCAE Dependencies (FeenoX & Gmsh) standalone
run: ./deps.sh

- name: Check script
run: php html/check.php

- name: Install Node Dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npx playwright test

- name: Upload Playwright Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report-standalone
path: playwright-report-stanadlone/
retention-days: 30

playwrigth-apt:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: yaml

- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y unzip patchelf wget php-cli php-yaml gnuplot

# feenox 1.2 is not available in ubuntu 24.04, only in 25.10
- name: Install SunCAE Dependencies (FeenoX & Gmsh) from apt
run: |
sudo apt-get install -y python3-gmsh pandoc
./deps.sh

- name: Check script
run: php html/check.php

- name: Install Node Dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npx playwright test

- name: Upload Playwright Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report-apt
path: playwright-report-apt/
retention-days: 30
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
bin
deps
data
node_modules/
test-results/
playwright-report/
8 changes: 7 additions & 1 deletion autoclean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ if [ ! -d auths ]; then
echo 1
fi

for i in bin deps data; do
# cat .gitgnore?
for i in bin deps data node_modules test-results playwright-report; do
echo -n "cleaning ${i}... "
rm -rf ${i} || exit 1
echo "ok"
Expand All @@ -32,3 +33,8 @@ for i in $(find . -name .gitignore); do
cd ${pwd}
fi
done

# more
for i in x3dom.js x3dom.css; do
find . -name {$i} | xargs rm -f
done
7 changes: 0 additions & 7 deletions cadimporters/upload/gmshcheck.py

This file was deleted.

9 changes: 7 additions & 2 deletions cadprocessors/gmsh/cad2stl.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/python3
import sys
sys.path.append("../../../../bin")
import gmsh
import os

script_dir = os.path.dirname(os.path.abspath(__file__))
bin_dir = os.path.join(script_dir, '../../', 'bin') # if bin is one level up
if os.path.exists(bin_dir):
sys.path.insert(0, bin_dir)
import gmsh

import math
import random
import colorsys
Expand Down
9 changes: 7 additions & 2 deletions cadprocessors/gmsh/cadcheck.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/python3
import sys
sys.path.append("../../../../bin")
import gmsh
import os

script_dir = os.path.dirname(os.path.abspath(__file__))
bin_dir = os.path.join(script_dir, '../../', 'bin') # if bin is one level up
if os.path.exists(bin_dir):
sys.path.insert(0, bin_dir)
import gmsh

import math
import json

Expand Down
9 changes: 7 additions & 2 deletions cadprocessors/gmsh/cadimport.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/usr/bin/python3
import sys
sys.path.append("../../../../bin")
import gmsh
import os

script_dir = os.path.dirname(os.path.abspath(__file__))
bin_dir = os.path.join(script_dir, '../../', 'bin') # if bin is one level up
if os.path.exists(bin_dir):
sys.path.insert(0, bin_dir)
import gmsh

import os
import math
import random
import colorsys
Expand Down
21 changes: 21 additions & 0 deletions cadprocessors/gmsh/gmshcheck.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/python3
import sys
import os

script_dir = os.path.dirname(os.path.abspath(__file__))
bin_dir = os.path.join(script_dir, '../../', 'bin') # if bin is one level up
if os.path.exists(bin_dir):
sys.path.insert(0, bin_dir)
import gmsh

# Initialize the Gmsh API
gmsh.initialize()

# Get the Gmsh version string
version = gmsh.option.getString("General.Version")

# Print the version
print(version)

# Finalize the Gmsh API
gmsh.finalize()
12 changes: 8 additions & 4 deletions cadprocessors/gmsh/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@
return_error_json("username is empty");
}

$cad_dir = "../../data/{$username}/cads/{$cad_hash}";
$cad_dir = $data_dir . "{$username}/cads/{$cad_hash}";
if (file_exists($cad_dir) === false) {
mkdir($cad_dir, $permissions, true);
if (mkdir($cad_dir, $permissions, true) === false) {
return_error_json("cannot mkdir {$cad_dir}");
}
}
if (chdir($cad_dir) === false) {
return_error_json("cannot chdir to {$cad_dir}");
}
chdir($cad_dir);

// ------------------------------------------------------------
if (file_exists("cad.json") === false) {
exec(sprintf("%s/cadimport.py 2>&1", __DIR__), $output, $error_level);

// TODO: keep output
if ($error_level != 0) {
$error_message = "Error {$error_level} when importing CAD: ";
Expand Down
8 changes: 6 additions & 2 deletions deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ for i in wget tar unzip python3; do
fi
done

# create gitignored directories
mkdir -p deps bin

# this one needs to be either world writable or owned by the user running the web server
# we start with 0777 but a sane admin would change it back to 0744 (or less)
if [ ! -d data ]; then
mkdir -p data
chmod 0777 data
fi

mkdir -p deps


# Function to compare versions (include in main deps.sh or source from a utils file)
# Function to compare versions
version_ge() {
printf '%s\n%s\n' "$2" "$1" | sort -V -C
return $?
Expand Down
Loading