Initial tests #5
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: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| jobs: | |
| extension-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.4" | |
| tools: composer:v2 | |
| - name: Install extension dependencies | |
| run: npm ci | |
| - name: Install Linux UI dependencies | |
| run: | | |
| sudo apt-get update | |
| ASOUND_PACKAGE=libasound2 | |
| if apt-cache show libasound2t64 >/dev/null 2>&1; then | |
| ASOUND_PACKAGE=libasound2t64 | |
| fi | |
| sudo apt-get install -y xvfb libnspr4 libnss3 libgtk-3-0 libxss1 libxshmfence1 libgbm1 "$ASOUND_PACKAGE" | |
| - name: Setup Laravel fixture | |
| run: composer run setup | |
| working-directory: src/test/fixtures/laravel-react | |
| - name: Run extension test suite | |
| run: xvfb-run -a npm test |