-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (47 loc) · 1.36 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
name: "CI"
on:
pull_request:
paths:
- "**.php"
- "bin/posthog"
- "phpcs.xml"
- "phpunit.xml"
- ".github/workflows/php.yml"
jobs:
phpunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0' # Specify your PHP version here
extensions: uopz # Add uopz extension
- uses: php-actions/composer@v6
- uses: php-actions/phpunit@v3
with:
php_extensions: xdebug
bootstrap: vendor/autoload.php
configuration: phpunit.xml
args: --coverage-text
version: 9.6
env:
XDEBUG_MODE: coverage
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # important!
# we may use whatever way to install phpcs, just specify the path on the next step
# however, curl seems to be the fastest
- name: Install PHP_CodeSniffer
run: |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar --version
- uses: tinovyatkin/action-php-codesniffer@v1
with:
files: "**.php" # you may customize glob as needed
phpcs_path: php phpcs.phar
standard: phpcs.xml
scope: "file"