Skip to content

remove mongodb driver #10

remove mongodb driver

remove mongodb driver #10

Workflow file for this run

name: Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
schedule:
- cron: '0 0 * * *' # Run daily at midnight
env:
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NO_INTERACTION: 1
COMPOSER_NO_AUDIT: 1
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false # Changed to false to see all failures
matrix:
php: [8.2, 8.3, 8.4]
laravel: [11.*, 12.*]
stability: [prefer-lowest, prefer-stable]
exclude:
# Skip incompatible PHP versions and Laravel versions
- php: 8.2
laravel: 12.*
- php: 8.4
stability: prefer-lowest
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}
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, intl, exif, iconv
coverage: xdebug
ini-values: error_reporting=E_ALL
tools: composer:v2
- name: Verify PHP and extensions
run: |
php -v
php -m
php --ini
- name: Setup problem matchers
run: |
echo "::add-matcher::/opt/hostedtoolcache/php.json"
echo "::add-matcher::/opt/hostedtoolcache/phpunit.json"
shell: /usr/bin/bash -e {0}
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}-${{ matrix.stability }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}-
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-
- name: Update composer.json for Laravel version
run: |
# Update testbench version for Laravel 12
if [[ "${{ matrix.laravel }}" == "12.*" ]]; then
composer require --no-update "orchestra/testbench:^10.0" --dev
fi
# Update testbench version for Laravel 11
if [[ "${{ matrix.laravel }}" == "11.*" ]]; then
composer require --no-update "orchestra/testbench:^9.0" --dev
fi
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List installed packages
run: composer show
- name: Check for PHPUnit
run: |
if [ -f vendor/bin/phpunit ]; then
echo "PHPUnit exists at vendor/bin/phpunit"
ls -la vendor/bin/phpunit
else
echo "PHPUnit not found!"
ls -la vendor/bin/
fi
- name: Check for tests directory
run: |
if [ -d tests ]; then
echo "Tests directory exists"
ls -la tests
else
echo "Tests directory not found!"
fi
- name: Run PHPUnit tests
run: |
if [ -f vendor/bin/phpunit ]; then
vendor/bin/phpunit --coverage-text --verbose
else
echo "PHPUnit not found, skipping tests"
exit 1
fi
- name: Run PHP Static Analysis
run: |
if [ -f vendor/bin/phpstan ]; then
vendor/bin/phpstan analyse
else
echo "PHPStan not found, skipping static analysis"
fi