Skip to content

Test against PHP 8.4 #289

Test against PHP 8.4

Test against PHP 8.4 #289

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
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
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: 7.4
mongo-ext: 1.20.0
mongo-img: 5.0
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
symfony: "^6.4"
- php: 8.3
mongo-ext: 1.19.0
mongo-img: 7.0
- php: 8.4
mongo-ext: 1.20.0
mongo-img: 7.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 }}
tools: flex
- name: Allow unstable dependencies
run: composer config minimum-stability dev
if: matrix.symfony == 'dev-master'
- 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@v5
with:
files: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true