Bump nesbot/carbon from 2.53.1 to 2.72.6 #19
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: Test | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| mariadb: | |
| image: mariadb:latest | |
| ports: | |
| - 3306 | |
| env: | |
| MYSQL_USER: user | |
| MYSQL_PASSWORD: password | |
| MYSQL_DATABASE: test | |
| MYSQL_ROOT_PASSWORD: password | |
| options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-suggest | |
| - name: Verify MariaDB connection | |
| env: | |
| PORT: ${{ job.services.mariadb.ports[3306] }} | |
| run: | | |
| while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do | |
| sleep 1 | |
| done | |
| - name: Init and seed database | |
| env: | |
| PORT: ${{ job.services.mariadb.ports[3306] }} | |
| run: | | |
| cat database.sql | |
| mysql -h"127.0.0.1" -P"$PORT" --user="user" --password="password" test < database.sql | |
| - name: Rename config | |
| env: | |
| PORT: ${{ job.services.mariadb.ports[3306] }} | |
| run: | | |
| sed "s/3306/$PORT/g" config/config.example.php > config/output.php | |
| rm config/config.php | |
| mv config/output.php config/config.php | |
| - name: Run tests | |
| run: ./vendor/bin/phpunit | |
| - name: Run PHP Static Analysis Tool | |
| run: ./vendor/bin/phpstan analyse src --level=1 | |
| - name: Upload code coverage | |
| env: | |
| TOKEN: ${{ secrets.CODE_COVERAGE_UPLOAD_TOKEN }} | |
| run: CODECOV_TOKEN="$TOKEN" bash <(curl -s https://codecov.io/bash) |