Skip to content

Commit 2e14c84

Browse files
committed
test workflow added
1 parent c92ee80 commit 2e14c84

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/test.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
pull_request:
7+
branches: [ master, dev, fix ]
8+
9+
jobs:
10+
php-tests:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
php: [8.0, 7.4]
16+
laravel: [8.*, 7.*]
17+
os: [ubuntu-latest]
18+
include:
19+
- laravel: 8.*
20+
testbench: 6.*
21+
- laravel: 7.*
22+
testbench: 5.*
23+
exclude:
24+
- laravel: 7.*
25+
php: 8.0
26+
27+
name: PHP ${{ matrix.php }} with Laravel ${{ matrix.laravel }} - ${{ matrix.os }}
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v2
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
35+
with:
36+
php-version: ${{ matrix.php }}
37+
extensions: dom, curl, libxml, mbstring, pdo, sqlite, pdo_sqlite
38+
coverage: none
39+
40+
- name: Install dependencies
41+
run: |
42+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
43+
composer update --prefer-dist --no-interaction --no-suggest
44+
45+
- name: Execute pest tests
46+
run: vendor/bin/pest

0 commit comments

Comments
 (0)