@@ -30,17 +30,33 @@ jobs:
30
30
uses : " shivammathur/setup-php@v2"
31
31
with :
32
32
php-version : " 8.3"
33
+ extensions : " json, mbstring, openssl, sqlite3, curl, uuid"
34
+ tools : castor
33
35
34
36
- name : " Checkout code"
35
37
uses : " actions/checkout@v4"
36
38
39
+ - name : " Fetch Git base reference"
40
+ run : " git fetch --depth=1 origin ${GITHUB_BASE_REF}"
41
+
42
+ - name : " Validate Composer configuration"
43
+ run : " castor validate"
44
+
37
45
- name : " Install dependencies"
38
46
uses : " ramsey/composer-install@v3"
39
47
with :
40
- dependency-versions : " highest"
48
+ dependency-versions : " ${{ matrix.dependencies }}"
49
+ composer-options : " --optimize-autoloader"
50
+
51
+ - name : " Cache dependencies"
52
+ uses : " actions/cache@v4"
53
+ id : " cache"
54
+ with :
55
+ path : " composer-cache"
56
+ key : " ${{ runner.os }}-${{ hashFiles('**/composer.json') }}"
41
57
42
58
- name : " Check source code for syntax errors"
43
- run : " composer exec -- parallel- lint src/ tests/ "
59
+ run : " castor lint"
44
60
45
61
unit_tests :
46
62
name : " 2️⃣ Unit and functional tests"
63
79
with :
64
80
php-version : " ${{ matrix.php-version }}"
65
81
extensions : " json, mbstring, openssl, sqlite3, curl, uuid"
82
+ tools : castor
66
83
coverage : " xdebug"
67
84
68
85
- name : " Checkout code"
75
92
composer-options : " --optimize-autoloader"
76
93
77
94
- name : " Execute unit tests"
78
- run : " make ci-cc "
95
+ run : " castor test --coverage-text "
79
96
80
97
static_analysis :
81
98
name : " 3️⃣ Static Analysis"
@@ -89,21 +106,19 @@ jobs:
89
106
with :
90
107
php-version : " 8.3"
91
108
extensions : " json, mbstring, openssl, sqlite3, curl, uuid"
109
+ tools : castor
92
110
93
111
- name : " Checkout code"
94
112
uses : " actions/checkout@v4"
95
113
96
- - name : " Validate Composer configuration"
97
- run : " composer validate --strict"
98
-
99
114
- name : " Install dependencies"
100
115
uses : " ramsey/composer-install@v3"
101
116
with :
102
117
dependency-versions : " highest"
103
118
composer-options : " --optimize-autoloader"
104
119
105
120
- name : " Execute static analysis"
106
- run : " make st "
121
+ run : " castor stan "
107
122
108
123
coding_standards :
109
124
name : " 4️⃣ Coding Standards"
@@ -117,21 +132,48 @@ jobs:
117
132
with :
118
133
php-version : " 8.3"
119
134
extensions : " json, mbstring, openssl, sqlite3, curl, uuid"
135
+ tools : castor
120
136
121
137
- name : " Checkout code"
122
138
uses : " actions/checkout@v4"
123
139
140
+ - name : " Install dependencies"
141
+ uses : " ramsey/composer-install@v3"
142
+ with :
143
+ dependency-versions : " highest"
144
+ composer-options : " --optimize-autoloader"
145
+
124
146
- name : " Check adherence to EditorConfig"
125
147
uses : " greut/eclint-action@v0"
126
148
149
+ - name : " Check coding style"
150
+ run : " castor cs"
151
+
152
+ check_licenses :
153
+ name : " 5️⃣ Check licenses"
154
+ needs :
155
+ - " byte_level"
156
+ - " syntax_errors"
157
+ runs-on : " ubuntu-latest"
158
+ steps :
159
+ - name : " Set up PHP"
160
+ uses : " shivammathur/setup-php@v2"
161
+ with :
162
+ php-version : " 8.3"
163
+ extensions : " json, mbstring, openssl, sqlite3, curl, uuid"
164
+ tools : castor
165
+
166
+ - name : " Checkout code"
167
+ uses : " actions/checkout@v4"
168
+
127
169
- name : " Install dependencies"
128
170
uses : " ramsey/composer-install@v3"
129
171
with :
130
172
dependency-versions : " highest"
131
173
composer-options : " --optimize-autoloader"
132
174
133
175
- name : " Check coding style"
134
- run : " make ci-cs "
176
+ run : " castor check-licenses "
135
177
136
178
rector_checkstyle :
137
179
name : " 6️⃣ Rector Checkstyle"
@@ -145,22 +187,20 @@ jobs:
145
187
with :
146
188
php-version : " 8.3"
147
189
extensions : " json, mbstring, openssl, sqlite3, curl, uuid"
190
+ tools : castor
148
191
coverage : " xdebug"
149
192
150
193
- name : " Checkout code"
151
194
uses : " actions/checkout@v4"
152
195
153
- - name : " Fetch Git base reference"
154
- run : " git fetch --depth=1 origin ${GITHUB_BASE_REF}"
155
-
156
196
- name : " Install dependencies"
157
197
uses : " ramsey/composer-install@v3"
158
198
with :
159
199
dependency-versions : " highest"
160
200
composer-options : " --optimize-autoloader"
161
201
162
202
- name : " Execute Rector"
163
- run : " make rector"
203
+ run : " castor rector"
164
204
165
205
exported_files :
166
206
name : " 7️⃣ Exported files"
0 commit comments