Update selenium/standalone-chromium Docker tag to v143 (#183) #150
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - 'feature/**' | |
| workflow_dispatch: | |
| inputs: | |
| enable_terminal: | |
| type: boolean | |
| description: 'Enable terminal session.' | |
| required: false | |
| default: false | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-versions: ['8.2', '8.3', '8.4'] | |
| services: | |
| chrome: | |
| image: selenium/standalone-chromium:143.0 | |
| ports: | |
| - 4444:4444 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/composer-cache | |
| key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| coverage: pcov | |
| ini-values: pcov.directory=. | |
| - name: Install dependencies | |
| run: | | |
| if [ "${{ matrix.php-versions }}" == "8.2" ]; then | |
| composer remove --dev drevops/phpcs-standard --no-update | |
| fi | |
| composer install | |
| - name: Validate composer.json | |
| run: | | |
| composer --verbose validate | |
| composer normalize --dry-run | |
| - name: Check coding standards | |
| if: matrix.php-versions == '8.3' | |
| run: composer lint | |
| continue-on-error: ${{ vars.CI_LINT_IGNORE_FAILURE == '1' }} | |
| - name: Run unit tests | |
| run: composer test-coverage | |
| continue-on-error: ${{ vars.CI_TEST_UNIT_IGNORE_FAILURE == '1' }} | |
| - name: Setup Chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| - name: Start Chrome | |
| run: chrome --no-sandbox --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222& | |
| - name: Run BDD tests | |
| run: composer test-bdd | |
| continue-on-error: ${{ vars.CI_TEST_BDD_IGNORE_FAILURE == '1' }} | |
| env: | |
| BEHAT_JAVASCRIPT_BASE_URL: http://172.17.0.1:8888 | |
| - name: Upload logs as artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{github.job}}-logs-${{ matrix.php-versions }} | |
| path: .logs | |
| include-hidden-files: true | |
| if-no-files-found: error | |
| - name: Upload coverage report to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: ${{ env.CODECOV_TOKEN != '' }} | |
| with: | |
| files: | | |
| .logs/coverage/behat/cobertura.xml | |
| .logs/coverage/phpunit/cobertura.xml | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Setup tmate session | |
| if: ${{ !cancelled() && github.event.inputs.enable_terminal }} | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 15 |