@@ -132,6 +132,63 @@ jobs:
132132 - name : 🧪 Run unit tests using pestphp/pest
133133 run : composer test
134134
135+ arch-testing :
136+ timeout-minutes : 4
137+ runs-on : ${{ matrix.os }}
138+ concurrency :
139+ cancel-in-progress : true
140+ group : arch-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }}
141+ strategy :
142+ fail-fast : true
143+ matrix :
144+ os :
145+ - ubuntu-latest
146+ php-version :
147+ - ' 8.1'
148+ dependencies :
149+ - locked
150+ steps :
151+ - name : 📦 Check out the codebase
152+ uses : actions/checkout@v4.1.6
153+
154+ - name : 🛠️ Setup PHP
155+ uses : shivammathur/setup-php@2.30.5
156+ with :
157+ php-version : ${{ matrix.php-version }}
158+ extensions : none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, opcache, pcntl, posix
159+ ini-values : error_reporting=E_ALL
160+ coverage : xdebug
161+
162+ - name : 🛠️ Setup problem matchers
163+ run : |
164+ echo "::add-matcher::${{ runner.tool_cache }}/php.json"
165+ echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
166+
167+ - name : 🤖 Validate composer.json and composer.lock
168+ run : composer validate --ansi --strict
169+
170+ - name : 🔍 Get composer cache directory
171+ uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
172+
173+ - name : ♻️ Restore cached dependencies installed with composer
174+ uses : actions/cache@v4.0.2
175+ with :
176+ path : ${{ env.COMPOSER_CACHE_DIR }}
177+ key : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
178+ restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
179+
180+ - name : ⚙️ Remove platform configuration with composer
181+ if : matrix.dependencies != 'locked'
182+ run : composer config platform.php --ansi --unset
183+
184+ - name : 📥 Install "${{ matrix.dependencies }}" dependencies
185+ uses : wayofdev/gh-actions/actions/composer/install@v3.1.0
186+ with :
187+ dependencies : ${{ matrix.dependencies }}
188+
189+ - name : 🧪 Run architecture tests using pestphp/pest
190+ run : composer test:arch
191+
135192 mutation-testing :
136193 timeout-minutes : 16
137194 runs-on : ${{ matrix.os }}
0 commit comments