Skip to content

Commit 9eb818d

Browse files
committed
Add GitHub Actions CI workflow for Pint and Pest
1 parent 80a87ff commit 9eb818d

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
pint:
13+
runs-on: ubuntu-latest
14+
name: Pint
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: 8.4
24+
extensions: dom, libxml, simplexml
25+
coverage: none
26+
27+
- name: Install dependencies
28+
run: composer install --prefer-dist --no-interaction
29+
30+
- name: Run Pint
31+
run: vendor/bin/pint --test
32+
33+
tests:
34+
runs-on: ubuntu-latest
35+
36+
strategy:
37+
fail-fast: true
38+
matrix:
39+
php: [8.2, 8.3, 8.4]
40+
laravel: [11.*, 12.*]
41+
include:
42+
- laravel: 11.*
43+
testbench: 9.*
44+
- laravel: 12.*
45+
testbench: 10.*
46+
47+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
48+
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v4
52+
53+
- name: Setup PHP
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: ${{ matrix.php }}
57+
extensions: dom, libxml, simplexml
58+
coverage: none
59+
60+
- name: Install dependencies
61+
run: |
62+
composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/http:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
63+
composer update --prefer-dist --no-interaction
64+
65+
- name: Run tests
66+
run: vendor/bin/pest

0 commit comments

Comments
 (0)