Skip to content

Commit 2a5d584

Browse files
committedApr 9, 2024··
Include PHPStan testing in actions
1 parent e15de41 commit 2a5d584

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed
 

‎.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ end_of_line = lf
66
indent_style = space
77
indent_size = 4
88
trim_trailing_whitespace = true
9-
insert_final_newline = true
9+
insert_final_newline = true
10+
11+
[.github/workflows/**.{yml,yaml}]
12+
indent_size = 2

‎.github/workflows/tests.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
jobs:
1010
unitTests:
1111
strategy:
12-
max-parallel: 4
1312
matrix:
1413
operatingSystem: [ubuntu-latest, windows-latest]
1514
phpVersion: ['8.1', '8.2', '8.3']
@@ -56,3 +55,42 @@ jobs:
5655

5756
- name: Run tests
5857
run: composer run test
58+
59+
staticAnalysis:
60+
runs-on: ubuntu-latest
61+
name: Static Analysis
62+
env:
63+
extensions: curl, fileinfo, openssl, zip
64+
key: winter-packager-v1
65+
66+
concurrency:
67+
group: ${{ github.workflow }}-${{ github.ref }}-phpstan
68+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
69+
70+
steps:
71+
- name: Checkout changes
72+
uses: actions/checkout@v4
73+
74+
- name: Install PHP
75+
uses: shivammathur/setup-php@v2
76+
with:
77+
php-version: 8.3
78+
tools: composer:v2
79+
extensions: ${{ env.extensions }}
80+
81+
- name: Setup dependency cache
82+
id: composercache
83+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
84+
85+
- name: Cache dependencies
86+
uses: actions/cache@v4
87+
with:
88+
path: ${{ steps.composercache.outputs.dir }}
89+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
90+
restore-keys: ${{ runner.os }}-composer-
91+
92+
- name: Install Composer dependencies
93+
run: composer install --no-interaction --no-progress --no-scripts
94+
95+
- name: Run tests
96+
run: ./vendor/bin/phpstan analyse

0 commit comments

Comments
 (0)
Please sign in to comment.