-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.07 KB
/
phpunit.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
name: PHP Code Styles
env:
COMPOSER_VER: "2.7.9"
PHP_VER: "8.0"
on:
push:
branches: [ "master", "main", "dev" ]
pull_request:
types: [synchronize, opened, reopened]
jobs:
php-cs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
steps:
- uses: actions/checkout@v3
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
with:
php_version: ${{ env.PHP_VER }}
version: ${{ env.COMPOSER_VER }}
- name: Get PHPCS Cache
id: phpcs-cache
run: |
echo "file=.phpcs.cache" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.phpcs-cache.outputs.file }}
key: ${{ runner.os }}-phpcs-${{ hashFiles('**/.phpcs.cache') }}
restore-keys: |
${{ runner.os }}-phpcs-
- name: Run PHPCS
run: composer run phpcs