Merge pull request #50 from PrestaShop/develop #56
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: PHP | |
on: [push, pull_request] | |
jobs: | |
cs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: composer install --no-interaction | |
- name: PHP CS Fixer | |
run: ./vendor/bin/php-cs-fixer fix --dry-run | |
- name: Run ergebnis/composer-normalize | |
run: composer normalize --dry-run --no-check-lock | |
tests-common: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: composer install --no-interaction | |
- name: PHPUnit | |
run: ./vendor/bin/phpunit --group=common --coverage-clover build/clover.xml | |
- name: Upload coverage results to Coveralls | |
if: matrix.php-versions == '7.4' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar | |
chmod +x php-coveralls.phar | |
php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv | |
tests-guzzle-client: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: composer install --no-interaction | |
- name: PHPUnit | |
run: ./vendor/bin/phpunit --group=guzzle-client --coverage-clover build/clover.xml | |
- name: Upload coverage results to Coveralls | |
if: matrix.php-versions == '7.4' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar | |
chmod +x php-coveralls.phar | |
php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv | |
tests-symfony-http-client: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
symfony-http-client-versions: ['5.4', '6.0', '6.1', '6.2', '6.3', '6.4'] | |
exclude: | |
- php-versions: '7.4' | |
symfony-http-client-versions: '6.0' | |
- php-versions: '7.4' | |
symfony-http-client-versions: '6.1' | |
- php-versions: '8.0' | |
symfony-http-client-versions: '6.1' | |
- php-versions: '7.4' | |
symfony-http-client-versions: '6.2' | |
- php-versions: '8.0' | |
symfony-http-client-versions: '6.2' | |
- php-versions: '7.4' | |
symfony-http-client-versions: '6.3' | |
- php-versions: '8.0' | |
symfony-http-client-versions: '6.3' | |
- php-versions: '7.4' | |
symfony-http-client-versions: '6.4' | |
- php-versions: '8.0' | |
symfony-http-client-versions: '6.4' | |
- php-versions: '8.2' | |
symfony-http-client-versions: '5.4' | |
- php-versions: '8.2' | |
symfony-http-client-versions: '6.0' | |
- php-versions: '8.3' | |
symfony-http-client-versions: '5.4' | |
- php-versions: '8.3' | |
symfony-http-client-versions: '6.0' | |
- php-versions: '8.4' | |
symfony-http-client-versions: '5.4' | |
- php-versions: '8.4' | |
symfony-http-client-versions: '6.0' | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
- uses: actions/checkout@v2 | |
- name: Require Symfony Http Client version | |
run: composer require symfony/http-client:${{ matrix.symfony-http-client-versions }} --no-interaction --no-update | |
- name: Install dependencies | |
run: composer install --no-interaction | |
- name: PHPUnit | |
run: ./vendor/bin/phpunit --group=symfony-http-client --coverage-clover build/clover.xml | |
- name: Upload coverage results to Coveralls | |
if: matrix.php-versions == '7.4' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar | |
chmod +x php-coveralls.phar | |
php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv |