Skip to content

Commit

Permalink
add GitHub workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
faiare committed Jul 22, 2024
1 parent 3117839 commit 0c45715
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: tests

on:
push:
pull_request:

jobs:
tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
laravel: [10, 11]
stability: ["prefer-lowest", "prefer-stable"]

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} (w/ ${{ matrix.stability }})
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
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none

- name: Set Laravel version
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "laravel/framework=^${{ matrix.laravel }}" --no-interaction --no-update

- name: Install dependencies
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --no-interaction

- name: Execute tests
run: vendor/bin/phpunit

0 comments on commit 0c45715

Please sign in to comment.