-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (43 loc) · 1.83 KB
/
php.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: PHP
on: [ push ]
jobs:
build:
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-latest', 'ubuntu-20.04', 'ubuntu-22.04' ]
php-version: [ '8.0', '8.1' ]
symfony-version: ['5.0.*', '5.1.*', '5.2.*', '5.3.*', '5.4.*']
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: xdebug, json, intl, mbstring, apcu, zip
tools: composer:v2
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Allow plugin symfony/flex to be used
run: composer global config --no-plugins allow-plugins.symfony/flex true
- name: Install symfony/flex globally
run: composer global require --no-interaction --no-progress --no-scripts --no-plugins symfony/flex
- name: Validate composer.json and composer.lock
run: composer validate --no-interaction --no-check-all --strict
- name: Install PHP dependencies
run: composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable --optimize-autoloader
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
- name: Run test suite
run: vendor/bin/phpunit -c phpunit.xml.dist --coverage-text