-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 900 Bytes
/
tests.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
name: "tests"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- php8.0
- php8.1
steps:
- uses: actions/checkout@v1
- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php-version }}-composer-
- name: "Validate composer.json file"
run: composer validate
- name: "Install PHP coding style checker"
run: composer require "squizlabs/php_codesniffer":"^3.0"
- name: "Check coding style after PSR-12 standard"
run: php ./vendor/bin/phpcs --standard=PSR12 --encoding=utf-8 -n ./src