Unit tests #21
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: 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 |