-
-
Save irving-caamal/38111275c063891be42e5feec8ef9960 to your computer and use it in GitHub Desktop.
CI pipeline for Github Actions, works with Laravel 8 with PHP 8
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-pipeline | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
php: [8.0] | |
laravel: [8.*] | |
dependency-version: [prefer-lowest, prefer-stable] | |
include: | |
- laravel: 8.* | |
name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup 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: none | |
- name: Install dependencies | |
run: | | |
cp .env.ci .env | |
touch database/database.sqlite | |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update | |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest | |
- name: Execute tests | |
run: vendor/bin/phpunit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment