Skip to content

Commit 30c9466

Browse files
author
Itamar Junior
committed
Add GitHub Actions workflow for Laravel package testing across PHP versions
1 parent a55400c commit 30c9466

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Laravel Package Test Action
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "*.x"
8+
pull_request:
9+
schedule:
10+
- cron: "0 0 * * *"
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
php: [8.2, 8.3]
20+
21+
name: PHP ${{ matrix.php }}
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
32+
coverage: none
33+
34+
- name: Install Composer dependencies
35+
run: composer install --prefer-dist --no-interaction --no-progress
36+
37+
- name: Copy environment file
38+
run: cp .env.example .env
39+
40+
- name: Generate app key
41+
run: php artisan key:generate
42+
43+
- name: Execute tests
44+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)