88
99name : Static analysis
1010
11- on :
12- pull_request :
13- push :
14- branches :
15- - master
16- - main
17- - stable*
11+ on : pull_request
1812
1913concurrency :
2014 group : psalm-${{ github.head_ref || github.run_id }}
2115 cancel-in-progress : true
2216
2317jobs :
18+ matrix :
19+ runs-on : ubuntu-latest-low
20+ outputs :
21+ ocp-matrix : ${{ steps.versions.outputs.ocp-matrix }}
22+ steps :
23+ - name : Checkout app
24+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25+ - name : Get version matrix
26+ id : versions
27+ uses : icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
28+
2429 static-analysis :
2530 runs-on : ubuntu-latest
31+ needs : matrix
32+ strategy :
33+ # do not stop on another job's failure
34+ fail-fast : false
35+ matrix : ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
2636
27- name : static-psalm-analysis
37+ name : static-psalm-analysis ${{ matrix.ocp-version }}
2838 steps :
2939 - name : Checkout
3040 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3141
32- - name : Get php version
33- id : versions
34- uses : icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
35-
36- - name : Set up php${{ steps.versions.outputs.php-available }}
42+ - name : Set up php${{ matrix.php-versions }}
3743 uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
3844 with :
39- php-version : ${{ steps.versions.outputs. php-available }}
45+ php-version : ${{ matrix. php-versions }}
4046 extensions : bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
4147 coverage : none
4248 ini-file : development
@@ -46,11 +52,23 @@ jobs:
4652 - name : Install dependencies
4753 run : |
4854 composer remove nextcloud/ocp --dev
49- rm composer.lock
5055 composer i
5156
52- - name : Install nextcloud/ocp
53- run : composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
57+
58+ - name : Install dependencies
59+ run : composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies
5460
5561 - name : Run coding standards check
5662 run : composer run psalm
63+
64+ summary :
65+ runs-on : ubuntu-latest-low
66+ needs : static-analysis
67+
68+ if : always()
69+
70+ name : static-psalm-analysis-summary
71+
72+ steps :
73+ - name : Summary status
74+ run : if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi
0 commit comments