Skip to content

Update README.md

Update README.md #42

Workflow file for this run

name: CI
on:
pull_request:
push:
jobs:
ecs:
name: PHP ${{ matrix.php }} ecs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom,fileinfo,filter,gd,hash,intl,json,mbstring,mysqli,pcre,pdo_mysql,zlib
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Install the dependencies
run: |
composer install --no-interaction --no-progress
composer bin ecs install --no-interaction --no-progress
- name: Run ECS
run: tools/ecs/vendor/bin/ecs check src tests --config ecs.php --no-progress-bar --ansi --fix
phpstan:
name: PHP ${{ matrix.php }} phpstan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom,fileinfo,filter,gd,hash,intl,json,mbstring,mysqli,pcre,pdo_mysql,zlib
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Install the dependencies
run: |
composer install --no-interaction --no-progress
composer bin phpstan install --no-interaction --no-progress
- name: Run PHPStan
run: tools/phpstan/vendor/bin/phpstan analyse --no-progress
tests:
name: PHP ${{ matrix.php }} tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom,fileinfo,filter,gd,hash,intl,json,mbstring,mysqli,pcre,pdo_mysql,zlib
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Install the dependencies
run: composer install --no-interaction --no-progress
- name: Create directories for test reports
run: mkdir -p docs/unit docs/integration
- name: Run PHPUnit with code coverage
run: vendor/bin/phpunit --colors=always --testsuite=unit --coverage-html docs/unit --testdox-text docs/unit/testdox.txt
- name: Initialize the database for integration tests
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot -e "CREATE database ContaoIsotopeStockBundleTest"
- name: Run the functional tests with PDO MySQL
run: vendor/bin/phpunit --testsuite=integrationCart --colors=always --coverage-html docs/integrationCart --testdox-text docs/integrationCart/testdox.txt
env:
DATABASE_URL: mysql://root:[email protected]:3306/ContaoIsotopeStockBundleTest
- name: Run the functional tests with PDO MySQL
run: vendor/bin/phpunit --testsuite=integrationCheckout --colors=always --coverage-html docs/integrationCheckout --testdox-text docs/integrationCheckout/testdox.txt
env:
DATABASE_URL: mysql://root:[email protected]:3306/ContaoIsotopeStockBundleTest
- name: Run the functional tests with PDO MySQL
run: vendor/bin/phpunit --testsuite=integrationAfterCheckout --colors=always --coverage-html docs/integrationAfterCheckout --testdox-text docs/integrationAfterCheckout/testdox.txt
env:
DATABASE_URL: mysql://root:[email protected]:3306/ContaoIsotopeStockBundleTest
- name: Upload test reports as artifacts
uses: actions/upload-artifact@v2
with:
name: test-reports
path: |
docs/unit
docs/integrationCart
docs/integrationOrder