Skip to content

chore: develop into master #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To be added...
Binary file added .github/assets/deployments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

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

"type: maintenance":
- changed-files:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
run: make validate-composer

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
with:
working-directory: app

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

- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
with:
working-directory: app
dependencies: ${{ matrix.dependencies }}
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
run: make validate-composer

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
with:
working-directory: app

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

- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
with:
working-directory: app
dependencies: ${{ matrix.dependencies }}
Expand Down
141 changes: 135 additions & 6 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ name: 🧪 Testing (SQLite)
env:
# Disable docker support in Makefile
APP_RUNNER: 'cd app &&'
APP_NAME: laravel
SHARED_SERVICES_NAMESPACE: ss
COMPOSE_PROJECT_NAME: laravel-starter-tpl

jobs:
code-coverage:
Expand Down Expand Up @@ -49,7 +52,7 @@ jobs:
run: make validate-composer

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
with:
working-directory: app

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

- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
with:
working-directory: app
dependencies: ${{ matrix.dependencies }}
Expand All @@ -70,10 +73,6 @@ jobs:
run: |
make env
cp -rf .env app/.env
env:
APP_NAME: laravel
SHARED_SERVICES_NAMESPACE: ss
COMPOSE_PROJECT_NAME: laravel-starter-tpl

- name: 🔑 Generate secret application key
working-directory: app
Expand All @@ -89,3 +88,133 @@ jobs:
files: app/.build/phpunit/logs/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

arch-testing:
timeout-minutes: 4
runs-on: ${{ matrix.os }}
concurrency:
cancel-in-progress: true
group: arch-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
php-version:
- '8.3'
dependencies:
- locked
steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v4.1.6

- name: 🛠️ Setup PHP
uses: shivammathur/setup-php@2.30.5
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
coverage: xdebug

- name: 🛠️ Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: 🤖 Validate composer.json and composer.lock
run: make validate-composer

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
with:
working-directory: app

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/cache@v4.0.2
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
with:
working-directory: app
dependencies: ${{ matrix.dependencies }}

- name: 🛠️ Prepare environment
run: |
make env
cp -rf .env app/.env

- name: 🔑 Generate secret application key
working-directory: app
run: php artisan key:generate

- name: 🧪 Run architecture tests using pestphp/pest
working-directory: app
run: composer test:arch

mutation-testing:
timeout-minutes: 16
runs-on: ${{ matrix.os }}
concurrency:
cancel-in-progress: true
group: mutation-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
php-version:
- '8.3'
dependencies:
- locked
steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v4.1.6

- name: 🛠️ Setup PHP
uses: shivammathur/setup-php@2.30.5
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
coverage: xdebug

- name: 🛠️ Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: 🤖 Validate composer.json and composer.lock
run: make validate-composer

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.1
with:
working-directory: app

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/cache@v4.0.2
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
uses: wayofdev/gh-actions/actions/composer/install@v3.1.1
with:
working-directory: app
dependencies: ${{ matrix.dependencies }}

- name: 🛠️ Prepare environment
run: |
make env
cp -rf .env app/.env

- name: 🔑 Generate secret application key
working-directory: app
run: php artisan key:generate

- name: 🧪 Run mutation testing using Xdebug and infection/infection
working-directory: app
run: composer infect:ci
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ lint-deptrac-ci: ## Runs deptrac – static analysis tool with github output (CI
.PHONY: lint-deptrac-ci

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

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

test: ## Run project php-unit and pest tests
test: ## Run project Functional tests using pest
$(APP_COMPOSER) test
.PHONY: test

test-arch: ## Run project architecture tests using pest
$(APP_COMPOSER) test:arch
.PHONY: test-arch

test-all: test test-arch ## Run all project tests
.PHONY: test-all

test-cc: ## Run project php-unit and pest tests in coverage mode and build report
$(APP_COMPOSER) test:cc
.PHONY: test-cc

test-pgsql: ## Run project tests with postgresql
$(APP_COMPOSER) test:pgsql
.PHONY: test-pgsql

api-docs-public: ## Generate openapi docs specification file for public api
$(APP_EXEC) php artisan open-docs:generate public
.PHONY: api-docs-public
Expand Down
Loading
Loading