feat(a11y): add new accessibility rules for nested interactive elemen… #21
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: QA | ||
|
Check failure on line 1 in .github/workflows/qa.yml
|
||
| on: | ||
| workflow_call: {} | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| php: [ '8.2', '8.3', '8.4' ] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| extensions: mbstring, dom, intl, xdebug | ||
| coverage: xdebug | ||
| - name: Get composer cache directory | ||
| id: composer-cache | ||
| run: echo "COMPOSER_CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV | ||
| - name: Cache composer dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: ${{ env.COMPOSER_CACHE_DIR }} | ||
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
| restore-keys: ${{ runner.os }}-composer- | ||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | ||
| - name: Run PHPStan | ||
| run: composer phpstan -- --no-progress | ||
| - name: Run php-cs-fixer (dry-run) | ||
| run: composer cs-lint | ||
| - name: Run twig-cs-fixer lint | ||
| run: vendor/bin/twig-cs-fixer lint . --config=.twig-cs-fixer.php --no-cache || true | ||
| - name: Run rector (dry-run) | ||
| run: composer rector -- --dry-run | ||
| - name: Run tests with coverage | ||
| env: | ||
| XDEBUG_MODE: coverage | ||
| run: | | ||
| ./vendor/bin/phpunit \ | ||
| --coverage-clover=build/coverage/coverage.xml \ | ||
| --coverage-xml=build/coverage/coverage-xml \ | ||
| --log-junit=build/coverage/junit.xml | ||
| - name: Upload coverage to Codecov | ||
| if: ${{ matrix.php == '8.3' && secrets.CODECOV_TOKEN != '' }} | ||
| uses: codecov/codecov-action@v6 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| files: build/coverage/coverage.xml | ||
| fail_ci_if_error: true | ||
| verbose: true | ||
| - name: Upload test results to Codecov | ||
| if: ${{ matrix.php == '8.3' && !cancelled() }} | ||
| uses: codecov/codecov-action@v6 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| files: build/coverage/junit.xml | ||
| report_type: test_results | ||
| fail_ci_if_error: false | ||
| infection: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.3' | ||
| extensions: mbstring, dom, intl, xdebug | ||
| coverage: xdebug | ||
| - name: Get composer cache directory | ||
| id: composer-cache | ||
| run: echo "COMPOSER_CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV | ||
| - name: Cache composer dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: ${{ env.COMPOSER_CACHE_DIR }} | ||
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
| restore-keys: ${{ runner.os }}-composer- | ||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | ||
| - name: Run tests with coverage (for Infection) | ||
| env: | ||
| XDEBUG_MODE: coverage | ||
| run: | | ||
| ./vendor/bin/phpunit \ | ||
| --coverage-xml=build/coverage/coverage-xml \ | ||
| --log-junit=build/coverage/junit.xml | ||
| - name: Run Infection (mutation testing) | ||
| run: | | ||
| vendor/bin/infection \ | ||
| --coverage=build/coverage \ | ||
| --skip-initial-tests \ | ||
| --no-progress \ | ||
| --threads=4 \ | ||
| --min-msi=50 | ||
| continue-on-error: true | ||
| - name: Upload Infection reports | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: infection-report | ||
| path: | | ||
| infection.html | ||
| infection.log | ||
| if-no-files-found: warn | ||