clean up rector config #284
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 build" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
jobs: | |
build: | |
name: PHP ${{ matrix.php-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.1', '8.2'] | |
steps: | |
- name: Setup PHP Action | |
uses: shivammathur/setup-php@v2 | |
with: | |
extensions: intl | |
php-version: "${{ matrix.php-versions }}" | |
coverage: xdebug | |
- name: Setup MySQL | |
uses: shogo82148/actions-setup-mysql@v1 | |
with: | |
mysql-version: '8.0' | |
- run: mysql -uroot -h127.0.0.1 -e 'SELECT version()' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Create DB | |
run: "mysql -u root -h 127.0.0.1 -e 'create database ci4_crud_test'" | |
- name: "Validate composer.json and composer.lock" | |
run: "composer validate" | |
- name: "Install dependencies" | |
run: "composer install" | |
- name: "CS Check" | |
run: "export PHP_CS_FIXER_IGNORE_ENV=true && composer cs-check" | |
- name: "Code analyze" | |
run: | | |
composer analyze | |
composer rectify | |
- name: "Run test suite" | |
run: "mv phpunit.xml.github-actions.dist phpunit.xml.dist && composer test" | |
- if: matrix.php-versions == '8.1' | |
name: Run mutation test | |
env: | |
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | |
run: | | |
composer require --dev infection/infection | |
vendor/bin/infection | |
- if: matrix.php-versions == '8.1' | |
name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./build/logs/clover.xml | |
flags: tests | |
name: codecov-umbrella | |
yml: ./codecov.yml | |
fail_ci_if_error: true |