Register controller services #1504
Workflow file for this run
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: Accessibility (a11y) Tests | |
| on: | |
| pull_request: | |
| env: | |
| COMPOSER_CACHE_DIR: /tmp/composer-cache | |
| jobs: | |
| a11y_tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: [ '8.4' ] | |
| node-version: [ '20' ] | |
| name: Accessibility Tests (PHP ${{ matrix.php-version }}, Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| env: | |
| APP_ENV: prod | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # see https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| # test the lowest version, to make sure checks pass on it | |
| php-version: ${{ matrix.php-version }} | |
| extensions: json, mbstring, pdo, curl, pdo_sqlite | |
| coverage: none | |
| tools: symfony-cli | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.COMPOSER_CACHE_DIR }} | |
| key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} | |
| - name: Cache NPM dependencies | |
| uses: actions/cache@v4 | |
| 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: Prepare environment | |
| run: | | |
| # Disable AppArmor to be able to run browser | |
| echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
| # 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 | |
| ./bin/console doctrine:fixtures:load --group=without-images -n | |
| symfony server:start --no-tls --port=8088 -d | |
| # Test whether web server works | |
| sleep 3 | |
| curl --silent --show-error --fail-with-body "http://127.0.0.1:8088/bolt/login" | |
| - name: Run pa11yci | |
| run: npm run a11y:test:all |