Skip to content

Tests

Tests #258

Workflow file for this run

name: Tests
on:
push:
branches:
- master
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ['8.0', '8.1', '8.2']
laravel: ['9']
stability: [ prefer-stable ]
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mongodb
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: xdebug
- name: Install dependencies
uses: nick-invision/retry@v2
with:
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-plugins --no-scripts --no-progress
max_attempts: 5
timeout_minutes: 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- 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