Skip to content

Commit 935ef8f

Browse files
authored
Merge pull request #408 from wayofdev/develop
2 parents 42d764e + 3ae8ca2 commit 935ef8f

25 files changed

+418
-167
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
To be added...

.github/assets/deployments.png

577 KB
Loading

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
"type: documentation":
1313
- changed-files:
14-
- any-glob-to-any-file: ['assets/**/*', '.github/*', './*.md']
14+
- any-glob-to-any-file: ['.github/*', './*.md']
1515

1616
"type: maintenance":
1717
- changed-files:

.github/workflows/coding-standards.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
run: make validate-composer
112112

113113
- name: 🔍 Get composer cache directory
114-
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
114+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
115115
with:
116116
working-directory: app
117117

@@ -123,7 +123,7 @@ jobs:
123123
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
124124

125125
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
126-
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
126+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
127127
with:
128128
working-directory: app
129129
dependencies: ${{ matrix.dependencies }}
@@ -180,7 +180,7 @@ jobs:
180180
run: make validate-composer
181181

182182
- name: 🔍 Get composer cache directory
183-
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
183+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
184184
with:
185185
working-directory: app
186186

@@ -192,7 +192,7 @@ jobs:
192192
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
193193

194194
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
195-
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
195+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
196196
with:
197197
working-directory: app
198198
dependencies: ${{ matrix.dependencies }}

.github/workflows/testing.yml

Lines changed: 135 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ name: 🧪 Testing (SQLite)
1111
env:
1212
# Disable docker support in Makefile
1313
APP_RUNNER: 'cd app &&'
14+
APP_NAME: laravel
15+
SHARED_SERVICES_NAMESPACE: ss
16+
COMPOSE_PROJECT_NAME: laravel-starter-tpl
1417

1518
jobs:
1619
code-coverage:
@@ -49,7 +52,7 @@ jobs:
4952
run: make validate-composer
5053

5154
- 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
5356
with:
5457
working-directory: app
5558

@@ -61,7 +64,7 @@ jobs:
6164
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
6265

6366
- 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
6568
with:
6669
working-directory: app
6770
dependencies: ${{ matrix.dependencies }}
@@ -70,10 +73,6 @@ jobs:
7073
run: |
7174
make env
7275
cp -rf .env app/.env
73-
env:
74-
APP_NAME: laravel
75-
SHARED_SERVICES_NAMESPACE: ss
76-
COMPOSE_PROJECT_NAME: laravel-starter-tpl
7776
7877
- name: 🔑 Generate secret application key
7978
working-directory: app
@@ -89,3 +88,133 @@ jobs:
8988
files: app/.build/phpunit/logs/clover.xml
9089
token: ${{ secrets.CODECOV_TOKEN }}
9190
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 }}

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ lint-deptrac-ci: ## Runs deptrac – static analysis tool with github output (CI
282282
.PHONY: lint-deptrac-ci
283283

284284
lint-deptrac-gv: ## Runs deptrac – static analysis tool and generates graphviz image
285-
$(APP_RUNNER) .phive/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter graphviz-image --output ../assets/deptrac.svg
285+
$(APP_RUNNER) .phive/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter graphviz-image --output ../.github/assets/deptrac.svg
286286
.PHONY: lint-deptrac-gv
287287

288288
lint-composer: ## Normalize composer.json and composer.lock files
@@ -308,14 +308,25 @@ infect-ci: ## Runs infection – mutation testing framework with github output (
308308
$(APP_COMPOSER) infect:ci
309309
.PHONY: lint-infect-ci
310310

311-
test: ## Run project php-unit and pest tests
311+
test: ## Run project Functional tests using pest
312312
$(APP_COMPOSER) test
313313
.PHONY: test
314314

315+
test-arch: ## Run project architecture tests using pest
316+
$(APP_COMPOSER) test:arch
317+
.PHONY: test-arch
318+
319+
test-all: test test-arch ## Run all project tests
320+
.PHONY: test-all
321+
315322
test-cc: ## Run project php-unit and pest tests in coverage mode and build report
316323
$(APP_COMPOSER) test:cc
317324
.PHONY: test-cc
318325

326+
test-pgsql: ## Run project tests with postgresql
327+
$(APP_COMPOSER) test:pgsql
328+
.PHONY: test-pgsql
329+
319330
api-docs-public: ## Generate openapi docs specification file for public api
320331
$(APP_EXEC) php artisan open-docs:generate public
321332
.PHONY: api-docs-public

0 commit comments

Comments
 (0)