Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Sep 17, 2024
1 parent aa01937 commit 74103e6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
name: CI

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- '*'

permissions:
contents: read

jobs:
cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
coverage: none
tools: phpstan:1.10, vimeo/psalm:5

- name: Composer Install
run: composer require --dev cakephp/cakephp-codesniffer:^5.0

- name: Run PHP CodeSniffer
run: vendor/bin/phpcs --standard=vendor/cakephp/cakephp-codesniffer/CakePHP -p src/ tests/

- name: Run psalm
if: always()
run: psalm --output-format=github

- name: Run phpstan
if: always()
run: phpstan
uses: ADmad/.github/.github/workflows/cs-stan.yml@master
secrets: inherit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"friendsofcake/crud":"^7.0"
},
"require-dev":{
"phpunit/phpunit":"^10.1",
"phpunit/phpunit":"^10.1 || ^11.0",
"friendsofcake/cakephp-test-utilities":"^3.0"
},
"autoload":{
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
parameters:
level: 8
checkMissingIterableValueType: false
paths:
- src
universalObjectCratesClasses:
- Crud\Event\Subject
ignoreErrors:
-
identifier: missingType.iterableValue
-
message: "#^Access to an undefined property Cake\\\\Controller\\\\Controller\\:\\:\\$Authentication\\.$#"
count: 4
Expand Down

0 comments on commit 74103e6

Please sign in to comment.