Skip to content

Schedule CI run weekly to keep it in check #121

Schedule CI run weekly to keep it in check

Schedule CI run weekly to keep it in check #121

Workflow file for this run

name: CI
on:
pull_request: ~
push:
branches:
- 1.x
schedule:
- cron: "42 3 * * 1"
jobs:
tests:
name: ${{ matrix.description }} - PHP ${{ matrix.php }}
runs-on: ubuntu-latest
services:
mongo:
image: mongo:4.4
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootPass
strategy:
matrix:
composer: ['composer:v2']
dependencies: ['highest']
description: ['Tests']
php: ['8.3']
mongodb: ['1.17.2']
include:
# TODO - Symfony 7
# - description: Tests - Symfony 6.4
# php: 8.3
# symfony-version: '7.*'
# mongodb: '1.17.2' # latest
- description: Tests - Symfony 6.4
php: 8.2
symfony-version: '6.4.*'
mongodb: '1.15.3' # 1.15 introduced PHP 8.2 support
- description: Tests - Symfony 5.4
php: 8.1
symfony-version: '5.4.*'
mongodb: '1.12.1' # 1.12 introduced PHP 8.1 support
- description: Tests - Symfony 5.4
php: 8.0
symfony-version: '5.4.*'
- description: Tests - Symfony 4.4
php: 7.4
mongodb: ['1.9.2']
symfony-version: '4.4.*'
- description: Prefer lowest
composer: 'composer:v1'
dependencies: 'lowest'
php: 7.4
symfony-version: '4.4.*'
mongodb: '1.2.0'
deprecations: disabled
- description: Infection
mongodb: ['1.9.2']
php: 7.4
symfony-version: '4.4.*'
env:
MONGO_HOST: localhost
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mongodb
coverage: xdebug2
tools: flex,${{ matrix.composer }}
- name: Allow unstable dependencies
run: composer config minimum-stability dev
if: matrix.symfony-version == 'dev-master'
- name: Install dependencies
uses: "ramsey/composer-install@v2"
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Await a bit for Mongo to spin up...
run: timeout 60 nc -z localhost 27017
- name: Run tests
if: matrix.description != 'Infection'
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
env:
SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.deprecations }}
- name: Run mutation testing
if: matrix.description == 'Infection'
run: vendor/bin/infection --show-mutations
- name: Upload code coverage
if: matrix.description != 'Infection'
uses: codecov/codecov-action@v1
with:
file: build/coverage-report.xml