changed from codeclimate to qlty.sh #89
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: CI | |
| on: | |
| push: | |
| branches: [ develop, dev-*, master ] | |
| pull_request: | |
| branches: [ develop, dev-*, master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| laravel: [ 10, 11, 12 ] | |
| php: [ 8.2, 8.3, 8.4 ] | |
| include: | |
| # Laravel 12: PHP 8.2–8.4 | |
| - laravel: 12 | |
| php: 8.2 | |
| - laravel: 12 | |
| php: 8.3 | |
| - laravel: 12 | |
| php: 8.4 | |
| exclude: | |
| - laravel: 10 | |
| php: 8.4 | |
| mysql: [ 5.7 ] | |
| services: | |
| mysql: | |
| image: mysql:${{ matrix.mysql }} | |
| ports: | |
| - 3306:3306 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | |
| MYSQL_DATABASE: testing | |
| options: >- | |
| --health-cmd="mysqladmin ping --silent" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| name: Laravel ${{ matrix.laravel }} / PHP ${{ matrix.php }} / MySQL ${{ matrix.mysql }} | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: testing | |
| DB_USERNAME: root | |
| DB_PASSWORD: '' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: > | |
| mbstring, | |
| pdo_mysql, | |
| zip, | |
| exif, | |
| intl, | |
| gd, | |
| bcmath, | |
| curl, | |
| dom, | |
| xdebug | |
| coverage: xdebug | |
| - name: Debug info | |
| run: | | |
| php -v | |
| composer --version | |
| mysql --version || true | |
| - name: Wait for MySQL | |
| run: | | |
| echo "Waiting for MySQL..." | |
| for i in {30..0}; do | |
| if mysqladmin ping -h 127.0.0.1 --silent; then | |
| echo "MySQL is ready" | |
| break | |
| fi | |
| echo "Waiting for MySQL ($i)..." | |
| sleep 1 | |
| done | |
| - name: Install dependencies | |
| run: | | |
| composer install --no-interaction --prefer-dist --no-progress | |
| - name: Ensure coverage directory exists | |
| run: mkdir -p coverage | |
| - name: Run Tests | |
| run: vendor/bin/phpunit --coverage-clover=coverage/clover.xml --path-coverage | |
| - uses: qltysh/qlty-action/coverage@v1 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: coverage/clover.xml | |