Skip to content

Commit eeb4d49

Browse files
committed
Add GitHub Actions workflow for automated testing with PHP and Laravel
1 parent 60036dc commit eeb4d49

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
schedule:
9+
- cron: "0 0 * * *"
10+
11+
jobs:
12+
tests:
13+
runs-on: ubuntu-22.04
14+
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
php: [8.2, 8.3, 8.4]
19+
laravel: [12]
20+
21+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
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, ioncube_loader
32+
ini-values: error_reporting=E_ALL
33+
tools: composer:v2
34+
coverage: none
35+
36+
- name: Install dependencies
37+
run: |
38+
composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts=^${{ matrix.laravel }}"
39+
40+
- name: Execute tests
41+
run: |
42+
vendor/bin/testbench workbench:build
43+
vendor/bin/testbench package:test
44+
env:
45+
STRIPE_SECRET: ${{ secrets.STRIPE_SECRET }}
46+
CACHE_DRIVER: array

0 commit comments

Comments
 (0)