Skip to content

Test suite

Test suite #476

Workflow file for this run

name: Test suite
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
static-analyse:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- uses: actions/cache@v2
id: cache-composer
with:
path: ~/.composer/cache
key: composer-php-8.2-${{ github.sha }}
restore-keys: composer-php-8.2-
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest
- name: Run PHP CS Fixer
run: make test.phpcs
unit-test:
name: Unit tests
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]
os: [ ubuntu-latest ]
include:
- os: [ ubuntu-latest ]
php: 7.4
composer-flag: "'--prefer-lowest'"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/cache@v2
id: cache-composer
with:
path: ~/.composer/cache
key: composer-php-${{ matrix.php }}-${{ github.sha }}
restore-keys: composer-php-${{ matrix.php }}-
- name: Valid composer.json
run: make test.composer
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest --no-plugins ${{ matrix.composer-flag }}
- name: Run PHPUnit tests
run: make test.phpunit
functional-test:
name: Functionnal tests
strategy:
matrix:
php: [ 8.0, 8.1, 8.2 ]
os: [ ubuntu-latest ]
include:
- os: [ ubuntu-latest ]
php: 7.4
composer-flag: "'--prefer-lowest'"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/cache@v2
id: cache-composer
with:
path: ~/.composer/cache
key: composer-php-${{ matrix.php }}-${{ github.sha }}
restore-keys: composer-php-${{ matrix.php }}-
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest --no-plugins ${{ matrix.composer-flag }}
- name: Run Behat tests
run: make test.behat