-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.48 KB
/
testing.yml
File metadata and controls
60 lines (47 loc) · 1.48 KB
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
name: PHP testing
on:
push:
branches: [ release ]
pull_request:
branches: [ release ]
jobs:
test:
name: Testing on PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1']
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: opcache.jit_buffer_size=256M, opcache.jit=1235, pcre.jit=1
coverage: pcov
- name: Get Composer Cache Directory
id: composer-cache-dir
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer packages
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer run-script test
- uses: actions/upload-artifact@v1
with:
name: Coverage report
path: coverage
- name: PHP CS Fixer
run: composer run-script lint:ci
env:
PHP_CS_FIXER_IGNORE_ENV: true