-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.73 KB
/
project.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: SymfonyUidDoctrine
on: [ push, pull_request ]
jobs:
core:
name: PHP ${{ matrix.php-versions }} - ${{ matrix.composer-dependencies }}
# https://hub.docker.com/_/ubuntu/
runs-on: ubuntu-18.04
strategy:
fail-fast: true
matrix:
php-versions: ['7.2', '7.3', '7.4']
composer-dependencies: ['', 'lowest']
steps:
# https://github.com/actions/checkout (official)
- name: Checkout
uses: actions/checkout@v2
# https://github.com/shivammathur/setup-php (community)
- name: Setup PHP, extensions and composer with shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: zip, xdebug
coverage: xdebug
env:
update: true
# —— Composer️ —————————————————————————————————————————————————————————
- name: Validate composer.json and composer.lock
run: composer validate
- 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@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.composer-dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.composer-dependencies }}-
- name: Install Composer dependencies
if: matrix.composer-dependencies == ''
run: composer update --no-suggest
- name: Install Composer dependencies - Lowest
if: matrix.composer-dependencies == 'lowest'
run: composer update --no-suggest --prefer-lowest
# —— Style —————————————————————————————————————————————————————————
- name: Launch PHP-CS-FIXER - tests
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --dry-run .
# —— PHPUnit —————————————————————————————————————————————————————————
- name: Launch PHPUnit tests
run: php vendor/bin/phpunit
# —— Infection —————————————————————————————————————————————————————————
- name: Launch Infection analysis
run: php vendor/bin/infection
continue-on-error: true