Merge pull request #612 from guilhermesimoes/bugfix/memory-leak #102
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: [ dev, master ] | |
| pull_request: | |
| branches: [ dev, master ] | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install Linux dependencies for headless openGL display | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libglx-mesa0 \ | |
| libgl1 \ | |
| xvfb \ | |
| x11-xserver-utils | |
| - name: Configure headless display on Linux | |
| shell: bash | |
| run: | | |
| export DISPLAY=:99.0 | |
| echo "DISPLAY=:99.0" >> $GITHUB_ENV | |
| Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
| sleep 3 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Build | |
| run: npm run build | |
| - name: Run Playwright tests | |
| run: npx playwright test | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-screenshots | |
| path: temp/playwright/ | |
| retention-days: 30 |