@@ -38,16 +38,14 @@ jobs:
38
38
xml-schema-file : ./info.xsd
39
39
40
40
php-lint :
41
- runs-on : ubuntu-latest
41
+ runs-on : ubuntu-22.04
42
+ name : php-lint
42
43
strategy :
43
44
matrix :
44
45
php-versions : ["8.1", "8.2"]
45
46
46
- name : php-lint
47
-
48
47
steps :
49
- - name : Checkout
50
- uses : actions/checkout@v3
48
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
51
49
52
50
- name : Set up php ${{ matrix.php-versions }}
53
51
uses : shivammathur/setup-php@v2
@@ -59,17 +57,19 @@ jobs:
59
57
run : composer run lint
60
58
61
59
php-cs :
62
- runs-on : ubuntu-latest
60
+ runs-on : ubuntu-22.04
63
61
name : php-cs
62
+ strategy :
63
+ matrix :
64
+ php-versions : [ "8.1", "8.2" ]
64
65
65
66
steps :
66
- - name : Checkout
67
- uses : actions/checkout@v3
67
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
68
68
69
69
- name : Set up php ${{ matrix.php-versions }}
70
70
uses : shivammathur/setup-php@v2
71
71
with :
72
- php-version : 8.1
72
+ php-version : ${{ matrix.php-versions }}
73
73
coverage : none
74
74
75
75
- name : Install dependencies
@@ -79,32 +79,50 @@ jobs:
79
79
run : composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
80
80
81
81
php-psalm-analysis :
82
- runs-on : ubuntu-latest
82
+ runs-on : ubuntu-22.04
83
83
strategy :
84
84
matrix :
85
- php-versions : ["8.1", "8.2"]
86
- ocp-version : ['dev-master' ]
85
+ php-versions : [ "8.1", "8.2" ]
86
+ server-versions : [ '30' ]
87
87
name : php-psalm-analysis
88
88
89
89
steps :
90
+ - name : Cache nextcloud server
91
+ id : nextcloud_setup
92
+ uses : actions/cache@v3
93
+ with :
94
+ path : nextcloud-${{ matrix.server-versions }}.zip
95
+ key : ${{ matrix.server-versions }}
96
+
97
+ - name : Download nextcloud ${{ matrix.server-versions }}
98
+ if : steps.nextcloud_setup.outputs.cache-hit != 'true'
99
+ continue-on-error : true
100
+ id : server-checkout
101
+ run : |
102
+ NCVERSION=${{ matrix.server-versions }}
103
+ wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
104
+ unzip latest-$NCVERSION.zip
105
+
90
106
- uses : actions/checkout@v3
107
+
91
108
- name : Set up php ${{ matrix.php-versions }}
92
109
uses : shivammathur/setup-php@v2
93
110
with :
94
- php-version : 7.4
111
+ php-version : ${{ matrix.php-versions }}
95
112
coverage : none
96
113
97
114
- name : Install dependencies
98
115
run : composer i
99
116
100
- - name : Install nextcloud/ocp
101
- run : composer require --dev nextcloud/ocp:${{ matrix.ocp-version }}
102
-
103
117
- name : Run coding standards check
104
118
run : composer run psalm
105
119
106
120
php-security-analysis :
107
- runs-on : ubuntu-latest
121
+ runs-on : ubuntu-22.04
122
+ permissions :
123
+ contents : read
124
+ actions : read
125
+ security-events : write
108
126
name : security analysis
109
127
steps :
110
128
- uses : actions/checkout@v3
@@ -124,24 +142,24 @@ jobs:
124
142
sarif_file : results.sarif
125
143
126
144
js-eslint :
127
- runs-on : ubuntu-latest
145
+ runs-on : ubuntu-22.04
128
146
name : eslint
129
147
130
148
steps :
131
- - uses : actions/checkout@v3
149
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
132
150
- name : Install dependencies
133
151
run : npm ci
134
152
135
153
- name : ESLint
136
154
run : npm run lint
137
155
138
156
stylelint :
139
- runs-on : ubuntu-latest
157
+ runs-on : ubuntu-22.04
140
158
141
159
name : stylelint
142
160
143
161
steps :
144
- - uses : actions/checkout@v3
162
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
145
163
- name : Install dependencies
146
164
run : npm ci
147
165
0 commit comments