Skip to content

test: merge tests to test multiple PHP and Laravel versions #1

test: merge tests to test multiple PHP and Laravel versions

test: merge tests to test multiple PHP and Laravel versions #1

Workflow file for this run

name: "Test on S"

Check failure on line 1 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: test
# Triggers the workflow on push or pull request events
on:
push:
branches:
- stable
- develop
pull_request:
workflow_dispatch:
jobs:
test:
name: PHPUnit Tests
runs-on: ubuntu-latest
matrix-build:
name: PHPUnit Tests Matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [8.2, 8.3]
laravel-version:
[
"9.*", # Test Laravel 9
"10.*", # Test latest version
]
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
- name: Composer self update
run: composer self-update >/dev/null 2>&1
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Lock laravel/framework version
env:
LARAVEL_VERSION: ${{ matrix.laravel-version }}
run: composer require laravel/framework:${{ matrix.laravel-version }} --no-update
- name: Vendor update
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-source --no-interaction
- name: Run test suites
run: composer run-script test
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php vendor/bin/php-coveralls -v