Skip to content

Commit

Permalink
Create php.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
radmen authored Nov 23, 2024
1 parent 2bc708d commit d9827e3
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: PHP Composer

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
tests:

runs-on: ubuntu-latest

strategy:
matrix:
composer: [highest, lowest]
php-versions: ['8.4']

steps:
- uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.composer }}

- name: Run Pest
run: ./vendor/bin/pest

pint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Run Ping
run: ./vendor/bin/pint --test

0 comments on commit d9827e3

Please sign in to comment.