@@ -11,6 +11,9 @@ name: 🧪 Testing (SQLite)
11
11
env :
12
12
# Disable docker support in Makefile
13
13
APP_RUNNER : ' cd app &&'
14
+ APP_NAME : laravel
15
+ SHARED_SERVICES_NAMESPACE : ss
16
+ COMPOSE_PROJECT_NAME : laravel-starter-tpl
14
17
15
18
jobs :
16
19
code-coverage :
49
52
run : make validate-composer
50
53
51
54
- name : 🔍 Get composer cache directory
52
- uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
55
+ uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
53
56
with :
54
57
working-directory : app
55
58
61
64
restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
62
65
63
66
- name : 📥 Install "${{ matrix.dependencies }}" dependencies with composer
64
- uses : wayofdev/gh-actions/actions/composer/install@v3.1.0
67
+ uses : wayofdev/gh-actions/actions/composer/install@v3.1.1
65
68
with :
66
69
working-directory : app
67
70
dependencies : ${{ matrix.dependencies }}
70
73
run : |
71
74
make env
72
75
cp -rf .env app/.env
73
- env :
74
- APP_NAME : laravel
75
- SHARED_SERVICES_NAMESPACE : ss
76
- COMPOSE_PROJECT_NAME : laravel-starter-tpl
77
76
78
77
- name : 🔑 Generate secret application key
79
78
working-directory : app
@@ -89,3 +88,133 @@ jobs:
89
88
files : app/.build/phpunit/logs/clover.xml
90
89
token : ${{ secrets.CODECOV_TOKEN }}
91
90
verbose : true
91
+
92
+ arch-testing :
93
+ timeout-minutes : 4
94
+ runs-on : ${{ matrix.os }}
95
+ concurrency :
96
+ cancel-in-progress : true
97
+ group : arch-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }}
98
+ strategy :
99
+ fail-fast : true
100
+ matrix :
101
+ os :
102
+ - ubuntu-latest
103
+ php-version :
104
+ - ' 8.3'
105
+ dependencies :
106
+ - locked
107
+ steps :
108
+ - name : 📦 Check out the codebase
109
+ uses : actions/checkout@v4.1.6
110
+
111
+ - name : 🛠️ Setup PHP
112
+ uses : shivammathur/setup-php@2.30.5
113
+ with :
114
+ php-version : ${{ matrix.php-version }}
115
+ extensions : mbstring, pdo, pdo_sqlite
116
+ ini-values : error_reporting=E_ALL
117
+ coverage : xdebug
118
+
119
+ - name : 🛠️ Setup problem matchers
120
+ run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
121
+
122
+ - name : 🤖 Validate composer.json and composer.lock
123
+ run : make validate-composer
124
+
125
+ - name : 🔍 Get composer cache directory
126
+ uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
127
+ with :
128
+ working-directory : app
129
+
130
+ - name : ♻️ Restore cached dependencies installed with composer
131
+ uses : actions/cache@v4.0.2
132
+ with :
133
+ path : ${{ env.COMPOSER_CACHE_DIR }}
134
+ key : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
135
+ restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
136
+
137
+ - name : 📥 Install "${{ matrix.dependencies }}" dependencies with composer
138
+ uses : wayofdev/gh-actions/actions/composer/install@v3.1.1
139
+ with :
140
+ working-directory : app
141
+ dependencies : ${{ matrix.dependencies }}
142
+
143
+ - name : 🛠️ Prepare environment
144
+ run : |
145
+ make env
146
+ cp -rf .env app/.env
147
+
148
+ - name : 🔑 Generate secret application key
149
+ working-directory : app
150
+ run : php artisan key:generate
151
+
152
+ - name : 🧪 Run architecture tests using pestphp/pest
153
+ working-directory : app
154
+ run : composer test:arch
155
+
156
+ mutation-testing :
157
+ timeout-minutes : 16
158
+ runs-on : ${{ matrix.os }}
159
+ concurrency :
160
+ cancel-in-progress : true
161
+ group : mutation-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
162
+ strategy :
163
+ fail-fast : true
164
+ matrix :
165
+ os :
166
+ - ubuntu-latest
167
+ php-version :
168
+ - ' 8.3'
169
+ dependencies :
170
+ - locked
171
+ steps :
172
+ - name : 📦 Check out the codebase
173
+ uses : actions/checkout@v4.1.6
174
+
175
+ - name : 🛠️ Setup PHP
176
+ uses : shivammathur/setup-php@2.30.5
177
+ with :
178
+ php-version : ${{ matrix.php-version }}
179
+ extensions : mbstring, pdo, pdo_sqlite
180
+ ini-values : error_reporting=E_ALL
181
+ coverage : xdebug
182
+
183
+ - name : 🛠️ Setup problem matchers
184
+ run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
185
+
186
+ - name : 🤖 Validate composer.json and composer.lock
187
+ run : make validate-composer
188
+
189
+ - name : 🔍 Get composer cache directory
190
+ uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
191
+ with :
192
+ working-directory : app
193
+
194
+ - name : ♻️ Restore cached dependencies installed with composer
195
+ uses : actions/cache@v4.0.2
196
+ with :
197
+ path : ${{ env.COMPOSER_CACHE_DIR }}
198
+ key : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
199
+ restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
200
+
201
+ - name : 📥 Install "${{ matrix.dependencies }}" dependencies with composer
202
+ uses : wayofdev/gh-actions/actions/composer/install@v3.1.1
203
+ with :
204
+ working-directory : app
205
+ dependencies : ${{ matrix.dependencies }}
206
+
207
+ - name : 🛠️ Prepare environment
208
+ run : |
209
+ make env
210
+ cp -rf .env app/.env
211
+
212
+ - name : 🔑 Generate secret application key
213
+ working-directory : app
214
+ run : php artisan key:generate
215
+
216
+ - name : 🧪 Run mutation testing using Xdebug and infection/infection
217
+ working-directory : app
218
+ run : composer infect:ci
219
+ env :
220
+ STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
0 commit comments