2020-03-13 16:54:07 +01:00
|
|
|
name: "Integrate"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: ~
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-10-15 11:06:13 +02:00
|
|
|
schedule:
|
|
|
|
- cron: "0 10 * * *"
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
static-code-analysis:
|
|
|
|
name: "Static Code Analysis"
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version:
|
|
|
|
- 7.4
|
2020-10-13 15:52:11 +02:00
|
|
|
- 7.3
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
- highest
|
2020-10-13 15:52:11 +02:00
|
|
|
- lowest
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: "Install PHP with extensions"
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
coverage: none
|
|
|
|
php-version: ${{ matrix.php-version }}
|
|
|
|
|
|
|
|
- name: "Determine composer cache directory"
|
|
|
|
id: determine-composer-cache-directory
|
2020-03-13 17:11:45 +01:00
|
|
|
run: echo "::set-output name=directory::$(composer config cache-dir)"
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
- name: "Cache dependencies installed with composer"
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
|
2020-03-18 12:12:52 +01:00
|
|
|
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}
|
2020-03-13 16:54:07 +01:00
|
|
|
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
|
|
|
|
|
2020-10-13 15:52:11 +02:00
|
|
|
- name: "Install lowest dependencies from composer.json"
|
|
|
|
if: matrix.dependencies == 'lowest'
|
|
|
|
run: composer update --no-interaction --no-progress --no-suggest --prefer-lowest
|
|
|
|
|
2020-03-13 16:54:07 +01:00
|
|
|
- name: "Install highest dependencies from composer.json"
|
|
|
|
if: matrix.dependencies == 'highest'
|
2020-03-13 17:12:47 +01:00
|
|
|
run: composer install --no-interaction --no-progress --no-suggest
|
2020-03-13 16:54:07 +01:00
|
|
|
|
2020-03-18 11:43:07 +01:00
|
|
|
- name: "Cache cache directory for vimeo/psalm"
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: .build/psalm
|
|
|
|
key: php-${{ matrix.php-version }}-psalm-${{ github.sha }}
|
|
|
|
restore-keys: php-${{ matrix.php-version }}-psalm-
|
|
|
|
|
2020-03-13 16:54:07 +01:00
|
|
|
- name: "Run vimeo/psalm"
|
2020-10-20 15:03:17 +02:00
|
|
|
run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
tests:
|
|
|
|
name: "Tests"
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version:
|
|
|
|
- 7.3
|
|
|
|
- 7.4
|
2020-10-20 15:03:17 +02:00
|
|
|
- nightly
|
2020-03-13 16:54:07 +01:00
|
|
|
|
2020-07-20 05:40:55 +02:00
|
|
|
symfony-version:
|
|
|
|
- 3
|
|
|
|
- 4
|
|
|
|
- 5
|
|
|
|
|
|
|
|
exclude:
|
|
|
|
- php-version: 7.1
|
|
|
|
symfony-version: 5
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: "Install PHP with extensions"
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
coverage: none
|
|
|
|
php-version: ${{ matrix.php-version }}
|
|
|
|
|
|
|
|
- name: "Determine composer cache directory"
|
|
|
|
id: determine-composer-cache-directory
|
|
|
|
run: echo "::set-output name=directory::$(composer config cache-dir)"
|
|
|
|
|
|
|
|
- name: "Cache dependencies installed with composer"
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
|
2020-07-20 05:40:55 +02:00
|
|
|
key: php-${{ matrix.php-version }}-composer-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
|
|
|
|
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.symfony-version }}-
|
2020-03-13 16:54:07 +01:00
|
|
|
|
2020-07-20 05:40:55 +02:00
|
|
|
- name: "Install symfony 3 dependencies from composer.json"
|
|
|
|
if: matrix.symfony-version == '3'
|
|
|
|
run: composer require symfony/framework-bundle ^3.0 --prefer-stable --update-with-all-dependencies --no-interaction --no-progress --no-suggest
|
2020-03-13 16:54:07 +01:00
|
|
|
|
2020-07-20 05:40:55 +02:00
|
|
|
- name: "Install Symfony 4 dependencies from composer.json"
|
|
|
|
if: matrix.symfony-version == '4'
|
|
|
|
run: composer require symfony/framework-bundle ^4.0 --prefer-stable --update-with-all-dependencies --no-interaction --no-progress --no-suggest
|
|
|
|
|
|
|
|
- name: "Install Symfony 5 dependencies from composer.json"
|
|
|
|
if: matrix.symfony-version == '5'
|
|
|
|
run: composer require symfony/framework-bundle ^5.0 --prefer-stable --update-with-all-dependencies --no-interaction --no-progress --no-suggest
|
2020-03-13 16:54:07 +01:00
|
|
|
|
|
|
|
- name: "Run unit tests with phpunit"
|
|
|
|
run: vendor/bin/phpunit --configuration=phpunit.xml
|
|
|
|
|
2020-07-20 05:40:55 +02:00
|
|
|
- name: "Build acceptance tests with codeception"
|
|
|
|
run: vendor/bin/codecept build
|
|
|
|
|
|
|
|
- name: "Run base acceptance tests with codeception"
|
|
|
|
run: vendor/bin/codecept run -v -g symfony-common
|
|
|
|
|
|
|
|
- name: "Run Symfony 3 acceptance tests with codeception"
|
|
|
|
if: matrix.symfony-version == '3'
|
|
|
|
run: vendor/bin/codecept run -v -g symfony-3
|
|
|
|
|
|
|
|
- name: "Run symfony 4 acceptance tests with codeception"
|
2020-07-20 09:09:39 +02:00
|
|
|
if: matrix.symfony-version == '4'
|
2020-07-20 05:40:55 +02:00
|
|
|
run: vendor/bin/codecept run -v -g symfony-4
|
|
|
|
|
|
|
|
- name: "Run Symfony 5 acceptance tests with codeception"
|
|
|
|
if: matrix.symfony-version == '5'
|
|
|
|
run: vendor/bin/codecept run -v -g symfony-5
|