Skip to content

Commit 1b0f801

Browse files
committed
Add GitHub Actions
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 0db8c33 commit 1b0f801

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/tests.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '*.x'
8+
pull_request:
9+
schedule:
10+
- cron: '0 0 * * *'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-22.04
18+
19+
strategy:
20+
fail-fast: true
21+
matrix:
22+
php: [8.1, 8.2, 8.3, 8.4]
23+
laravel: [10, 11]
24+
exclude:
25+
- php: 8.1
26+
laravel: 11
27+
- php: 8.4
28+
laravel: 10
29+
30+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php }}
40+
extensions: dom, curl, libxml, mbstring, zip
41+
ini-values: error_reporting=E_ALL
42+
tools: composer:v2
43+
coverage: none
44+
45+
- name: Install dependencies
46+
run: |
47+
composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}"
48+
49+
- name: Execute tests
50+
run: vendor/bin/pest

composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"php": "^8.1",
99
"composer-runtime-api": "^2.2",
1010
"fakerphp/faker": "^1.24",
11+
"illuminate/contracts": "^10.48.23|^11.35",
12+
"illuminate/support": "^10.48.23|^11.35",
1113
"orchestra/workbench": "^8.17|^9.13",
1214
"symfony/polyfill-php83": "^1.31"
1315
},

0 commit comments

Comments
 (0)