-
-
Notifications
You must be signed in to change notification settings - Fork 811
36 lines (34 loc) · 1.28 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, fileinfo, mbstring
ini-values: post_max_size=256M, upload_max_filesize=256M, max_execution_time=300, max_input_time=300
tools: cs2pr, phpcs
- name: Check PHP Version
run: php -v
- name: Composer & Npm Install
run: |
composer validate --no-check-all --strict
composer install --no-progress --no-suggest --no-interaction --optimize-autoloader
pwd
- name: Run phpcs
continue-on-error: true
run: |
phpcs --extensions=php -p --standard=$GITHUB_WORKSPACE/vendor/kunena/codestyle/Kunena/ruleset.xml --report=checkstyle $GITHUB_WORKSPACE/src --report-checkstyle=$GITHUB_WORKSPACE/phpcs-report.xml
- name: Show PHPCS results in PR
continue-on-error: true
run: cs2pr $GITHUB_WORKSPACE/phpcs-report.xml --graceful-warnings --colorize