Merge pull request #53 from magento-commerce/php83-fix #86
This file contains 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: CI | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
dependencies: | |
- "lowest" | |
- "highest" | |
name: Tests with PHP ${{ matrix.php-version }} and ${{ matrix.dependencies }} dependencies | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Validate composer | |
run: composer validate | |
- name: Composer install | |
uses: "ramsey/composer-install@v1" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
composer-options: "${{ matrix.composer-options }}" | |
# Exclude E_DEPRECATED on PHP 8.1. | |
# Remove once https://github.com/tomzx/php-semver-checker/pull/112 fixed | |
- name: Sets error reporting | |
if: contains(${{ matrix.php-version }}, '8.1') | |
run: echo "error_reporting=24575" >> $GITHUB_ENV | |
- name: Run unit tests suite | |
run: vendor/bin/phpunit --configuration dev/tests/Unit/phpunit.xml.dist | |
- name: Run code style suite | |
run: vendor/bin/phpcs --standard=psr12 src/ --ignore=*.min.css | |
- name: Run tests code style | |
run: vendor/bin/phpcs --standard=psr12 dev/tests/ --ignore=/_files/ -n |