Bump serialize-javascript, @symfony/webpack-encore and workbox-webpack-plugin #1574
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: Cypress Tests | |
| on: | |
| pull_request: | |
| env: | |
| COMPOSER_CACHE_DIR: /tmp/composer-cache | |
| NODE_VERSION: 24 | |
| jobs: | |
| cypress-tests: | |
| name: Cypress Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| PHP_VERSION: 8.2 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| # test the lowest version, to make sure checks pass on it | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: json, mbstring, pdo, curl, pdo_sqlite | |
| coverage: none | |
| tools: symfony-cli | |
| # Configure PHP to disable Session garbage collector and fix the timezone to UTC like Bolt use to compare date. | |
| ini-values: session.gc_probability=0, date.timezone=UTC | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| # See https://github.community/t/sudo-apt-install-fails-with-failed-to-fetch-http-security-ubuntu-com-404-not-found-ip/17075 | |
| - run: sudo apt-get update | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ env.COMPOSER_CACHE_DIR }} | |
| key: ${{ runner.os }}-${{ env.PHP_VERSION }}-${{ hashFiles('**/composer.json') }} | |
| - name: Cache NPM dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/npm-cache | |
| key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
| - run: composer install --no-progress --no-interaction | |
| - name: Show Bolt info | |
| run: ./bin/console bolt:info --ansi | |
| - name: Install NPM dependencies | |
| run: npm ci --prefer-offline --no-audit --cache /tmp/npm-cache | |
| - name: Install other dependencies | |
| run: | | |
| mkdir -p ./var/log/e2e-reports/report/features/ | |
| touch ./var/log/e2e-reports/report/features/.gitkeep | |
| # Install latest stable Chrome for e2e tests | |
| sudo apt-get --fix-broken install | |
| sudo apt-get install libxss1 libindicator7 | |
| wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| sudo apt-get install ./google-chrome*.deb | |
| - name: Prepare environment | |
| run: | | |
| # Prepare php assets | |
| ./bin/console assets:install --symlink --relative public --ansi | |
| ./bin/console bolt:copy-assets --ansi | |
| # build assets | |
| npm run build | |
| sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/ | |
| # prepare web server for e2e tests | |
| ./bin/console doctrine:schema:create -q | |
| ./bin/console doctrine:migrations:sync-metadata-storage -q | |
| ./bin/console doctrine:migrations:version --add --all -n -q | |
| ./bin/console doctrine:fixtures:load --group=without-images -n | |
| - name: Cypress run | |
| uses: cypress-io/github-action@v6 | |
| with: | |
| install: false | |
| start: symfony server:start --no-tls --port=8088 -d | |
| command: npm run cypress:ci | |
| wait-on: 'http://127.0.0.1:8088' | |
| env: | |
| BOLT_CANONICAL: https://example.org | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: cypress-evidence | |
| path: | | |
| tests/cypress/evidence | |
| var/log |