.github/workflows/ci.yml
name: Continuous Integration
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *" # every day at midnight
jobs:
laravel-tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
php: [7.4]
os: [ubuntu-20.04]
name: ${{ matrix.php }} / ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: xdebug
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Run tests
run: ./vendor/bin/phpunit --coverage-text