-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (59 loc) · 2.05 KB
/
ci.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
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on:
push:
pull_request:
env:
php_extensions: 'dom, iconv, intl, json, mbstring, opcache, pcntl, pcov, session, simplexml, xml, zip, xdebug'
key: cache-v0.1
jobs:
lint:
runs-on: '${{ matrix.operating_system }}'
timeout-minutes: 20
strategy:
matrix:
operating_system: [ubuntu-latest]
php_versions: ['8.3']
experimental: [false]
include:
- operating_system: 'ubuntu-latest'
php_versions: '8.4'
experimental: true
fail-fast: false
env:
PHP_CS_FIXER_FUTURE_MODE: '0'
name: 'Linter PHP'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Setup cache environment'
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: '${{ matrix.php_versions }}'
extensions: '${{ env.php_extensions }}'
key: '${{ env.key }}'
- name: 'Cache extensions'
uses: actions/cache@v1
with:
path: '${{ steps.cache-env.outputs.dir }}'
key: '${{ steps.cache-env.outputs.key }}'
restore-keys: '${{ steps.cache-env.outputs.key }}'
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: '${{ env.php_extensions }}'
ini-values: memory_limit=-1
tools: pecl, composer
coverage: none
- name: 'Setup problem matchers for PHP (aka PHP error logs)'
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"'
- name: 'Setup problem matchers for PHPUnit'
run: 'echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"'
- name: 'Install PHP dependencies with Composer'
continue-on-error: ${{ matrix.experimental }}
run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader
working-directory: './'
- name: 'Linting PHP source files'
continue-on-error: ${{ matrix.experimental }}
run: 'vendor/bin/ecs check --config=ecs.php .'