-
Notifications
You must be signed in to change notification settings - Fork 19
42 lines (38 loc) · 1.27 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: dom
coverage: xdebug
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --ignore-platform-reqs
- name: PHP Code Sniffer
if: matrix.php-versions == '8.1'
run: composer phpcs
- name: PHP Mess Detector
if: matrix.php-versions == '8.1'
run: composer phpmd
- name: PHP Unit Tests with coverage
if: matrix.php-versions == '8.1'
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: PHP Unit Tests
if: matrix.php-versions != '8.1'
run: composer test
- name: Send to coveralls
if: matrix.php-versions == '8.1'
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}