Skip to content

Commit cb1083b

Browse files
committed
Create run-test.yml
1 parent b1733b5 commit cb1083b

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/run-test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/run-tests.yml'
8+
- 'phpunit.xml.dist'
9+
- 'composer.json'
10+
- 'composer.lock'
11+
pull_request:
12+
13+
jobs:
14+
test:
15+
runs-on: ${{ matrix.os }}
16+
timeout-minutes: 5
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest]
21+
php: [8.3, 8.2, 8.1]
22+
laravel: [10.*, 11.*]
23+
stability: [prefer-stable]
24+
include:
25+
- laravel: 10.*
26+
testbench: 8.*
27+
- laravel: 11.*
28+
testbench: 9.*
29+
exclude:
30+
- laravel: 11.*
31+
php: 8.1
32+
33+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }}
34+
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
44+
coverage: none
45+
46+
- name: Setup problem matchers
47+
run: |
48+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
49+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
50+
51+
- name: Install dependencies
52+
run: |
53+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
54+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
55+
56+
- name: List Installed Dependencies
57+
run: composer show -D
58+
59+
- name: Execute tests
60+
run: vendor/bin/phpunit tests

0 commit comments

Comments
 (0)