Skip to content

Commit

Permalink
Adds action for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrylopez authored Feb 24, 2024
1 parent b9f0b2b commit fe5bc46
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on: ['push', 'pull_request']

jobs:
ci:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3]
dependency-version: [prefer-lowest, prefer-stable]

name: Tests PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: php-dependencies-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist

- name: Run Tests
run: composer test

0 comments on commit fe5bc46

Please sign in to comment.