|
@@ -40,6 +40,11 @@ jobs:
|
|
|
calculate-code-coverage: 'yes'
|
|
|
phpunit-flags: '--testsuite coverage --exclude-group covers-nothing --coverage-clover build/logs/clover.xml'
|
|
|
|
|
|
+ - operating-system: 'ubuntu-20.04'
|
|
|
+ php-version: '7.4'
|
|
|
+ job-description: 'with deployment'
|
|
|
+ execute-deployment: 'yes'
|
|
|
+
|
|
|
- operating-system: 'ubuntu-20.04'
|
|
|
php-version: '7.4'
|
|
|
job-description: 'with migration rules'
|
|
@@ -99,8 +104,8 @@ jobs:
|
|
|
composer-
|
|
|
|
|
|
- name: Configure Symfony Flex
|
|
|
+ if: matrix.execute-flex-with-symfony-version
|
|
|
run: composer config extra.symfony.require ${{ matrix.execute-flex-with-symfony-version }}
|
|
|
- if: "matrix.execute-flex-with-symfony-version"
|
|
|
|
|
|
- name: Install dependencies
|
|
|
uses: nick-invision/retry@v2
|
|
@@ -113,8 +118,8 @@ jobs:
|
|
|
composer info -D
|
|
|
|
|
|
- name: Execute migration rules
|
|
|
+ if: matrix.execute-migration-rules == 'yes'
|
|
|
run: php php-cs-fixer fix --rules @PHP73Migration,@PHP71Migration:risky,blank_line_after_opening_tag -q
|
|
|
- if: "matrix.execute-migration-rules == 'yes'"
|
|
|
|
|
|
- name: Run tests
|
|
|
continue-on-error: ${{ matrix.php-version == '8.0' }}
|
|
@@ -136,3 +141,19 @@ jobs:
|
|
|
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.PHP_CS_FIXER_IGNORE_ENV }}
|
|
|
PHP_CS_FIXER_FUTURE_MODE: 1
|
|
|
run: php php-cs-fixer --diff --dry-run -v fix
|
|
|
+
|
|
|
+ - name: Execute deployment checks
|
|
|
+ if: matrix.execute-deployment == 'yes'
|
|
|
+ run: |
|
|
|
+ ./dev-tools/build.sh
|
|
|
+ PHP_CS_FIXER_TEST_ALLOW_SKIPPING_SMOKE_TESTS=0 vendor/bin/phpunit tests/Smoke/
|
|
|
+
|
|
|
+ - name: Execute deployment post-hook
|
|
|
+ if: matrix.execute-deployment == 'yes' && startsWith(github.ref, 'refs/tags/v')
|
|
|
+ env:
|
|
|
+ TRAVIS_TOKEN: ${{ secrets.TRAVIS_TOKEN }}
|
|
|
+ run: |
|
|
|
+ # ensure that deployment is happening only if tag matches version of PHP CS Fixer
|
|
|
+ test $(php dev-tools/info-extractor.php | jq -r .version.vnumber) == "${GITHUB_REF#refs/tags/}"
|
|
|
+ # trigger website update
|
|
|
+ ./dev-tools/trigger-website.sh ${TRAVIS_TOKEN} ${GITHUB_REF#refs/tags/}
|