-
Notifications
You must be signed in to change notification settings - Fork 27
57 lines (46 loc) · 1.46 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
51
52
53
54
55
56
57
name: CI
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "lowest"
- "highest"
name: Tests with PHP ${{ matrix.php-version }} and ${{ matrix.dependencies }} dependencies
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate composer
run: composer validate
- name: Composer install
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-options }}"
# Exclude E_DEPRECATED on PHP 8.1.
# Remove once https://github.com/tomzx/php-semver-checker/pull/112 fixed
- name: Sets error reporting
if: contains(${{ matrix.php-version }}, '8.1')
run: echo "error_reporting=24575" >> $GITHUB_ENV
- name: Run unit tests suite
run: vendor/bin/phpunit --configuration dev/tests/Unit/phpunit.xml.dist
- name: Run code style suite
run: vendor/bin/phpcs --standard=psr12 src/ --ignore=*.min.css
- name: Run tests code style
run: vendor/bin/phpcs --standard=psr12 dev/tests/ --ignore=/_files/ -n