Merge pull request #529 from aseure/limit-proxy-usage-to-administrator #571
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Composer | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['7.2', '7.3', '7.4'] | |
experimental: [false] | |
include: | |
- php-versions: '8.0' | |
experimental: true | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Cache Composer dependencies | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} | |
- name: Validate composer.json and composer.lock | |
uses: php-actions/composer@v5 | |
with: | |
command: validate | |
php_version: ${{ matrix.php-versions }} | |
version: 1 | |
- name: Install dependencies | |
uses: php-actions/composer@v5 | |
with: | |
command: install | |
args: --prefer-dist --no-progress --no-suggest --verbose | |
php_version: ${{ matrix.php-versions }} | |
version: 1 | |
- name: Remove intentional crash test in dependency | |
uses: php-actions/composer@v5 | |
with: | |
command: run-script clean-crash-test | |
version: 1 | |
php_version: ${{ matrix.php-versions }} | |
- name: Remove unsupported PHP 8 symfony/polyfill return types | |
uses: jacobtomlinson/gha-find-replace@v2 | |
with: | |
find: ": string|false" | |
replace: " " | |
include: "**/symfony/polyfill-intl-{idn,normalizer}/bootstrap80.php" | |
regex: false | |
- name: PHP syntax check | |
run: for f in $(find . -name '*.php'); do php -l $f; RETVAL=$?; if [ $RETVAL -ne 0 ]; then exit $RETVAL; fi; done | |
- name: Format | |
uses: php-actions/composer@v5 | |
with: | |
command: run-script format | |
php_version: ${{ matrix.php-versions }} | |
version: 1 | |
- name: Run test suite | |
uses: php-actions/composer@v5 | |
with: | |
command: run-script test | |
php_version: ${{ matrix.php-versions }} | |
version: 1 |