-
Notifications
You must be signed in to change notification settings - Fork 0
Update CI configuration for PHP 8.5 and add caching for Composer. #15
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8792d3b
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze c05e094
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze 348af75
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze 72c590a
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze 8eb9f09
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze 7f577ce
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze 37ea68e
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze bd66257
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze f17fd14
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze c8058eb
chore: Update CI configuration for PHP 8.5 and add caching for Composer.
gustavofreze File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,68 @@ | ||
| ifeq ($(OS),Windows_NT) | ||
| PWD := $(shell cd) | ||
| else | ||
| PWD := $(shell pwd -L) | ||
| endif | ||
|
|
||
| PWD := $(CURDIR) | ||
| ARCH := $(shell uname -m) | ||
| PLATFORM := | ||
|
|
||
| ifeq ($(ARCH),arm64) | ||
| PLATFORM := --platform=linux/amd64 | ||
| endif | ||
|
|
||
| DOCKER_RUN = docker run ${PLATFORM} --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.3 | ||
| DOCKER_RUN = docker run ${PLATFORM} --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.5-alpine | ||
|
|
||
| .PHONY: configure test test-file test-no-coverage review show-reports clean | ||
| RESET := \033[0m | ||
| GREEN := \033[0;32m | ||
| YELLOW := \033[0;33m | ||
|
|
||
| configure: | ||
| .DEFAULT_GOAL := help | ||
|
|
||
| .PHONY: configure | ||
| configure: ## Install and optimize Composer dependencies | ||
| @${DOCKER_RUN} composer update --optimize-autoloader | ||
|
|
||
| test: | ||
| .PHONY: test | ||
| test: ## Run all tests with coverage | ||
| @${DOCKER_RUN} composer tests | ||
|
|
||
| test-file: | ||
| .PHONY: test-file | ||
| test-file: ## Run tests for a specific file (usage: make test-file FILE=path/to/file) | ||
| @${DOCKER_RUN} composer test-file ${FILE} | ||
|
|
||
| test-no-coverage: | ||
| .PHONY: test-no-coverage | ||
| test-no-coverage: ## Run all tests without coverage | ||
| @${DOCKER_RUN} composer tests-no-coverage | ||
|
|
||
| review: | ||
| .PHONY: review | ||
| review: ## Run code review/static analysis | ||
| @${DOCKER_RUN} composer review | ||
|
|
||
| show-reports: | ||
| .PHONY: show-reports | ||
| show-reports: ## Open coverage and mutation reports in browser | ||
| @sensible-browser report/coverage/coverage-html/index.html report/coverage/mutation-report.html | ||
|
|
||
| clean: | ||
| .PHONY: clean | ||
| clean: ## Clean generated files and reset permissions | ||
| @sudo chown -R ${USER}:${USER} ${PWD} | ||
| @rm -rf report vendor .phpunit.cache *.lock | ||
|
|
||
| .PHONY: help | ||
| help: ## Display this help message | ||
| @echo "Usage: make [target]" | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Setup$$(printf '$(RESET)')" | ||
| @grep -E '^(configure):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*? ## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Testing$$(printf '$(RESET)')" | ||
| @grep -E '^(test|test-file|test-no-coverage):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Quality$$(printf '$(RESET)')" | ||
| @grep -E '^(review):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Reports$$(printf '$(RESET)')" | ||
| @grep -E '^(show-reports):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' | ||
| @echo "" | ||
| @echo "$$(printf '$(GREEN)')Cleanup$$(printf '$(RESET)')" | ||
| @grep -E '^(clean):.*?## .*$$' $(MAKEFILE_LIST) \ | ||
| | awk 'BEGIN {FS = ":.*?## "}; {printf "$(YELLOW)%-25s$(RESET) %s\n", $$1, $$2}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.