Skip to content

Commit

Permalink
Create tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone authored Mar 3, 2020
1 parent f827f91 commit db3cc32
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3, 7.2]
laravel: [6.x, 7.x]
os: [ubuntu-latest, windows-latest]

name: PHP${{ matrix.php }} with Laravel ${{ matrix.laravel }} on ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit

0 comments on commit db3cc32

Please sign in to comment.