Skip to content

Commit

Permalink
Merge pull request #12 from the-kbA-team/11-cake5-php-81-setup
Browse files Browse the repository at this point in the history
11 cake5 php 81 setup
  • Loading branch information
KBA-gitanito authored Mar 21, 2024
2 parents 03fb1ae + 34709b0 commit c4c1b28
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 2,923 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Composer config validation
composer:
name: Composer config validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate composer.json
run: composer validate --strict

# PHP syntax validation
php:
name: PHP syntax validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check PHP syntax
run: php -l src/ tests/

phpunit:
name: PHPUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [ 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php_version }}
php_extensions: intl

- run: vendor/bin/phpunit

# phpstan for several php versions
phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [ 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php_version }}
php_extensions: intl
- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
php_version: ${{ matrix.php_version }}
configuration: phpstan.neon
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/composer.lock
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"php": "^8.1",
"ext-json": "*",
"cakephp/cakephp": "~5.0",
"graylog2/gelf-php": "^2",
"graylog2/gelf-php": "^2.0",
"kba-team/php-backtrace": "^1.0",
"kba-team/graylog-utilities": "^2.0.1"
},
Expand All @@ -27,5 +27,10 @@
"psr-4": {
"Tests\\kbATeam\\CakePhpGraylog\\": "tests/"
}
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
Loading

0 comments on commit c4c1b28

Please sign in to comment.