changed CI config. #13
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 | |
| strategy: | |
| matrix: | |
| php: [7.2, 7.3, 7.4, 8.0 ] | |
| mysql: [5.7, 8.0] | |
| exclude: | |
| - php: 8.0 # incompatible | |
| services: | |
| mysql: | |
| image: mysql:${{ matrix.mysql }} | |
| 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 }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, pdo, sqlite, curl, dom, mysql | |
| coverage: none | |
| - name: Install dependencies | |
| run: | | |
| composer install --no-interaction ${{ matrix.composer_option || '' }} | |
| - name: Prepare Code Climate Reporter | |
| run: | | |
| curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
| chmod +x ./cc-test-reporter | |
| ./cc-test-reporter before-build | |
| - name: Run Tests | |
| run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
| - name: Send coverage to Code Climate | |
| env: | |
| CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
| run: ./cc-test-reporter after-build -t clover --exit-code $? | |