Skip to content

Commit

Permalink
Add multiple PHP versions in test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Nov 15, 2023
1 parent 6f1d23d commit f2298aa
Showing 1 changed file with 15 additions and 33 deletions.
48 changes: 15 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,18 @@
name: Run Test Suite

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

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
name: Run Unit Test on PHP ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v3

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: vendor/bin/phpunit
php-version: ${{ matrix.php-versions }}
extensions: intl #optional
ini-values: "post_max_size=256M" #optional
- name: Check PHP Version
run: php -v

0 comments on commit f2298aa

Please sign in to comment.