chore: add webview demo app and dev architecture docs #42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [main, web-widget] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| extensions: ffi | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction | |
| - name: Install virtual display and WebView dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xvfb cmake libgtk-3-dev libwebkit2gtk-4.1-dev | |
| - name: Build WebView helper binary | |
| run: | | |
| cd src/lib/webview_helper | |
| bash build.sh | |
| - name: Run Tk widget tests | |
| run: | | |
| Xvfb :99 -screen 0 1024x768x24 & | |
| export DISPLAY=:99 | |
| sleep 1 | |
| php tests/index_test.php | |
| php tests/widgets_test/AdditionalWidgetsTest.php | |
| php tests/widgets_test/ButtonTest.php | |
| php tests/widgets_test/CanvasTest.php | |
| php tests/widgets_test/CheckbuttonTest.php | |
| php tests/widgets_test/GeometryTest.php | |
| php tests/widgets_test/InputTest.php | |
| php tests/widgets_test/LabelTest.php | |
| php tests/widgets_test/MenuTest.php | |
| php tests/widgets_test/MenubuttonTest.php | |
| php tests/widgets_test/MessageTest.php | |
| php tests/widgets_test/TopLevelWidgetTest.php | |
| php tests/widgets_test/WindowTest.php | |
| - name: Run WebView tests | |
| run: | | |
| export DISPLAY=:99 | |
| php tests/webview/HelperBinaryTest.php | |
| php tests/webview/WebViewWidgetTest.php | |
| php tests/webview/EventLoopIntegrationTest.php | |
| test-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| extensions: ffi | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction | |
| - name: Install CMake | |
| run: brew install cmake || true | |
| - name: Build WebView helper binary | |
| run: | | |
| cd src/lib/webview_helper | |
| bash build.sh | |
| - name: Run Tk widget tests | |
| run: | | |
| php tests/index_test.php | |
| php tests/widgets_test/AdditionalWidgetsTest.php | |
| php tests/widgets_test/ButtonTest.php | |
| php tests/widgets_test/CanvasTest.php | |
| php tests/widgets_test/CheckbuttonTest.php | |
| php tests/widgets_test/GeometryTest.php | |
| php tests/widgets_test/InputTest.php | |
| php tests/widgets_test/LabelTest.php | |
| php tests/widgets_test/MenuTest.php | |
| php tests/widgets_test/MenubuttonTest.php | |
| php tests/widgets_test/MessageTest.php | |
| php tests/widgets_test/TopLevelWidgetTest.php | |
| php tests/widgets_test/WindowTest.php | |
| - name: Run WebView tests | |
| run: | | |
| php tests/webview/HelperBinaryTest.php | |
| php tests/webview/WebViewWidgetTest.php | |
| php tests/webview/EventLoopIntegrationTest.php | |
| test-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| extensions: ffi | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction | |
| - name: Build WebView helper binary | |
| shell: cmd | |
| run: | | |
| cd src\lib\webview_helper | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . --config Release | |
| - name: Run Tk widget tests | |
| run: | | |
| php tests/index_test.php | |
| php tests/widgets_test/AdditionalWidgetsTest.php | |
| php tests/widgets_test/ButtonTest.php | |
| php tests/widgets_test/CanvasTest.php | |
| php tests/widgets_test/CheckbuttonTest.php | |
| php tests/widgets_test/GeometryTest.php | |
| php tests/widgets_test/InputTest.php | |
| php tests/widgets_test/LabelTest.php | |
| php tests/widgets_test/MenuTest.php | |
| php tests/widgets_test/MenubuttonTest.php | |
| php tests/widgets_test/MessageTest.php | |
| php tests/widgets_test/TopLevelWidgetTest.php | |
| php tests/widgets_test/WindowTest.php | |
| - name: Run WebView tests | |
| run: | | |
| php tests/webview/HelperBinaryTest.php | |
| php tests/webview/WebViewWidgetTest.php | |
| php tests/webview/EventLoopIntegrationTest.php |