Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldyrynda committed Sep 8, 2020
1 parent 640b703 commit 841e4bc
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: run-tests

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

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3]
laravel: [^8.0]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]

name: P${{ matrix.php }} - L${{ matrix.laravel }} ${{ matrix.dependency-version }} - ${{ matrix.os }}

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

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

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

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

0 comments on commit 841e4bc

Please sign in to comment.