Skip to content

Commit 37e984c

Browse files
committed
fix: Fix psalm workflow
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 92826dc commit 37e984c

File tree

1 file changed

+16
-36
lines changed

1 file changed

+16
-36
lines changed

.github/workflows/psalm-matrix.yml

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,27 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24-
matrix:
25-
runs-on: ubuntu-latest-low
26-
outputs:
27-
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
28-
steps:
29-
- name: Checkout app
30-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31-
- name: Get version matrix
32-
id: versions
33-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
34-
3524
static-analysis:
3625
runs-on: ubuntu-latest
37-
needs: matrix
38-
strategy:
39-
# do not stop on another job's failure
40-
fail-fast: false
41-
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
4226

43-
name: static-psalm-analysis ${{ matrix.ocp-version }}
27+
name: static-psalm-analysis
4428
steps:
4529
- name: Checkout
46-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
persist-credentials: false
33+
34+
- name: Get php version
35+
id: versions
36+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
4737

48-
- name: Set up php${{ matrix.php-versions }}
38+
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
39+
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
40+
41+
- name: Set up php${{ steps.versions.outputs.php-available }}
4942
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
5043
with:
51-
php-version: ${{ matrix.php-versions }}
44+
php-version: ${{ steps.versions.outputs.php-available }}
5245
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
5346
coverage: none
5447
ini-file: development
@@ -60,21 +53,8 @@ jobs:
6053
composer remove nextcloud/ocp --dev
6154
composer i
6255
63-
64-
- name: Install dependencies
65-
run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies
56+
- name: Install nextcloud/ocp
57+
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
6658

6759
- name: Run coding standards check
68-
run: composer run psalm
69-
70-
summary:
71-
runs-on: ubuntu-latest-low
72-
needs: static-analysis
73-
74-
if: always()
75-
76-
name: static-psalm-analysis-summary
77-
78-
steps:
79-
- name: Summary status
80-
run: if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi
60+
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github

0 commit comments

Comments
 (0)