Skip to content

Fixed PHP versions #377

Fixed PHP versions

Fixed PHP versions #377

Workflow file for this run

name: run-tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
LITTLEJWT_OPENSSL_CNF: /usr/lib/ssl/openssl.cnf
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
laravel: [10.x, 11.x]
stability: [prefer-stable]
include:
- laravel: 10.x
php: 8.1
testbench: ^8.0
- laravel: 10.x
php: 8.2
testbench: ^8.0
- laravel: 11.x
php: 8.2
testbench: ^9.0
exclude:
- laravel: 11.x
php: 8.1
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: xdebug
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: composer test
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v