Skip to content

Commit

Permalink
Added GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Dec 1, 2023
1 parent fddea02 commit 44b040c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "8.1"
- "8.3"

steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php-version }}

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: php-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}

- name: Install Composer dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test

0 comments on commit 44b040c

Please sign in to comment.