Skip to content

Commit

Permalink
TASK: Run php-stan on ci in Neos 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Jan 18, 2024
1 parent a454a71 commit 2b82a2c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"require": {
"neos/flow-development-collection": "8.3.x-dev"
},
"scripts": {
"lint:phpstan": "../../bin/phpstan analyse",
"lint": [
"@lint:phpstan"
]
},
"replace": {
},
"suggest": {
Expand Down
32 changes: 10 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
contents: read # to fetch code (actions/checkout)

if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip travis]')"
name: "PHP ${{ matrix.php-versions }} Test ${{ matrix.static-analysis != 'no' && matrix.static-analysis || '' }} (deps: ${{ matrix.dependencies }})"
name: "PHP ${{ matrix.php-versions }} Test ${{ matrix.static-analysis != 'no' && 'static analysis ' || '' }} (deps: ${{ matrix.dependencies }})"

continue-on-error: ${{ matrix.experimental }}

Expand All @@ -26,24 +26,11 @@ jobs:
composer-arguments: [''] # to run --ignore-platform-reqs in experimental builds
static-analysis: ['no']
experimental: [false]
#include:
#- php-versions: '7.3'
# static-analysis: 'psalm'
# experimental: false
# dependencies: 'highest'

# Experimental build for PHP nightly
#- php-versions: 'nightly'
# composer-arguments: '--ignore-platform-reqs'
# static-analysis: 'no'
# experimental: true
# dependencies: 'highest'

# Build for minimum dependencies. Fails right now, hence deactivated.
#- php-versions: '7.1'
# static-analysis: 'no'
# experimental: false
# dependencies: 'lowest'
include:
- php-versions: '8.1'
static-analysis: 'yes'
experimental: false
dependencies: 'highest'

runs-on: ubuntu-latest
services:
Expand Down Expand Up @@ -142,6 +129,7 @@ jobs:
run: echo "FLOW_CONTEXT=${{ env.FLOW_CONTEXT }}" >> $GITHUB_ENV

- name: Setup Flow configuration
if: matrix.static-analysis == 'no'
run: |
rm -f Configuration/Routes.yaml
rm -f Configuration/Testing/Settings.yaml
Expand All @@ -163,9 +151,9 @@ jobs:
./flow configuration:show
./flow routing:list
#- name: Static analysis
# if: matrix.static-analysis == 'psalm'
# run: composer test-static
- name: Static analysis
if: matrix.static-analysis == 'yes'
run: cd Packages/Neos && composer lint:phpstan

- name: Run unit tests
if: matrix.static-analysis == 'no'
Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
"neos/form": "*",
"neos/kickstarter": "~8.3.0"
},
"scripts": {
"lint:phpstan": "../../bin/phpstan analyse",
"lint": [
"@lint:phpstan"
]
},
"replace": {
"typo3/typo3cr": "self.version",
"packagefactory/atomicfusion-afx": "*",
Expand Down

0 comments on commit 2b82a2c

Please sign in to comment.