Skip to content

Commit 2956100

Browse files
committed
Add CI workflow
1 parent 17a7597 commit 2956100

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: run-ci
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
ci:
8+
runs-on: ubuntu-24.04
9+
timeout-minutes: 5
10+
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
php: [8.3, 8.4]
15+
laravel: [11.*, 12.*]
16+
include:
17+
- laravel: 11.*
18+
testbench: 9.*
19+
larastan: 3.*
20+
- laravel: 12.*
21+
testbench: 10.*
22+
larastan: 3.*
23+
24+
name: CI - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Cache dependencies
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.composer/cache/files
33+
key: dependencies-pw-v2-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php }}
39+
extensions: curl, mbstring, zip, pcntl, iconv
40+
coverage: none
41+
tools: composer:v2
42+
43+
- name: Install dependencies
44+
run: |
45+
composer --version
46+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
47+
composer require "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev
48+
composer require "larastan/larastan:${{ matrix.larastan }}" --no-interaction --no-update --dev
49+
composer update --prefer-dist --no-interaction --no-suggest --dev
50+
composer dump
51+
52+
- name: Run Larastan
53+
run: composer static-analysis

0 commit comments

Comments
 (0)