@@ -20,39 +20,74 @@ concurrency:
2020 group : psalm-${{ github.head_ref || github.run_id }}
2121 cancel-in-progress : true
2222
23- jobs :
24- static-analysis :
25- runs-on : ubuntu-latest
23+ permissions :
24+ contents : read
2625
27- name : static-psalm-analysis
26+ jobs :
27+ matrix :
28+ runs-on : ubuntu-latest-low
29+ outputs :
30+ ocp-matrix : ${{ steps.versions.outputs.ocp-matrix }}
2831 steps :
29- - name : Checkout
32+ - name : Checkout app
3033 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+ with :
35+ persist-credentials : false
3136
32- - name : Get php version
37+ - name : Get version matrix
3338 id : versions
3439 uses : icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3540
3641 - name : Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
3742 run : grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
3843
39- - name : Set up php${{ steps.versions.outputs.php-available }}
40- uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
44+ static-analysis :
45+ runs-on : ubuntu-latest
46+ needs : matrix
47+ strategy :
48+ # do not stop on another job's failure
49+ fail-fast : false
50+ matrix : ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
51+
52+ name : static-psalm-analysis ${{ matrix.ocp-version }}
53+ steps :
54+ - name : Checkout
55+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+ with :
57+ persist-credentials : false
58+
59+ - name : Set up php${{ matrix.php-min }}
60+ uses : shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
4161 with :
42- php-version : ${{ steps.versions.outputs. php-available }}
62+ php-version : ${{ matrix. php-min }}
4363 extensions : bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
4464 coverage : none
4565 ini-file : development
66+ # Temporary workaround for missing pcntl_* in PHP 8.3
67+ ini-values : disable_functions=
4668 env :
4769 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4870
4971 - name : Install dependencies
5072 run : |
51- composer remove nextcloud/ocp --dev
73+ composer remove nextcloud/ocp --dev --no-scripts
5274 composer i
5375
54- - name : Install nextcloud/ocp
55- run : composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
76+
77+ - name : Install dependencies # zizmor: ignore[template-injection]
78+ run : composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies
5679
5780 - name : Run coding standards check
58- run : composer run psalm
81+ run : composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github
82+
83+ summary :
84+ runs-on : ubuntu-latest-low
85+ needs : static-analysis
86+
87+ if : always()
88+
89+ name : static-psalm-analysis-summary
90+
91+ steps :
92+ - name : Summary status
93+ run : if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi
0 commit comments