Skip to content

Commit

Permalink
Update githook.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
digitlimit authored Nov 8, 2024
1 parent 5c41c86 commit f370fbd
Showing 1 changed file with 25 additions and 66 deletions.
91 changes: 25 additions & 66 deletions .github/workflows/githook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,74 +10,33 @@ permissions:
contents: read

jobs:
test-php-7-4:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Execute tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php vendor/bin/testbench package:test

test-php-8-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Execute tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php vendor/bin/testbench package:test
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']

test-php-8-1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Execute tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php vendor/bin/testbench package:test
- uses: actions/checkout@v3

test-php-8-2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Execute tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php vendor/bin/testbench package:test
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Run tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php vendor/bin/testbench package:test

0 comments on commit f370fbd

Please sign in to comment.