Skip to content

Update phpunit/phpunit requirement from ^9.6.13 to ^11.2.7 (#170) #233

Update phpunit/phpunit requirement from ^9.6.13 to ^11.2.7 (#170)

Update phpunit/phpunit requirement from ^9.6.13 to ^11.2.7 (#170) #233

Workflow file for this run

name: CI
on:
pull_request: ~
push:
branches:
- master
jobs:
tests:
name: Tests (PHP ${{ matrix.php }}, ext-mongodb ${{ matrix.mongo-ext }}, MongoDB ${{ matrix.mongo-img }}, Symfony ${{ matrix.symfony }})
runs-on: ubuntu-latest
services:
mongo:
image: mongo:${{ matrix.mongo-img }}
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootPass
# options: >-
# --health-cmd '/etc/init.d/mongodb status || exit 1'
# --health-interval 5s
# --health-timeout 3s
# --health-retries 5
strategy:
matrix:
include:
- php: 7.4
mongo-ext: 1.6.0
mongo-img: 4.2
symfony: "^4.4"
- php: 8.1
mongo-ext: 1.12.0
mongo-img: 5.0
symfony: "^5.4"
- php: 8.2
mongo-ext: 1.15.0
mongo-img: 6.0
- php: 8.3
mongo-ext: 1.16.0
mongo-img: 6.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mongodb-${{ matrix.mongo-ext }}
- name: Allow unstable dependencies
run: composer config minimum-stability dev
if: matrix.symfony == 'dev-master'
- name: Restrict Symfony version
run: composer require "symfony/symfony:${{ matrix.symfony }}" --no-update
if: matrix.symfony
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Await a bit for Mongo to spin up...
run: sleep 10
- name: Run tests
run: bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
file: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true