-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migrate): migrado para php >= 8.0
- Loading branch information
Showing
33 changed files
with
3,012 additions
and
1,473 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Pipeline | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
testsuite: | ||
name: Testes Automatizados | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: ["8.0", "8.1", "8.2"] | ||
|
||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl, curl, zlib, dom, openssl, soap, json, simplexml, libxml | ||
|
||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
# Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository | ||
# 10 commits is an arbitrary value that is more than 1 commit | ||
fetch-depth: 10 | ||
|
||
- name: Composer Install | ||
run: composer install --no-progress -o --no-ansi --no-interaction | ||
|
||
- name: Check php code style | ||
run: composer check-style | ||
|
||
- name: Análises estáticas | ||
run: composer analysis | ||
|
||
- name: Rodando PHPUnit | ||
run: composer test | ||
|
||
- name: Enviando cobertura de código | ||
run: php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml |
This file contains 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 |
---|---|---|
|
@@ -49,3 +49,4 @@ $RECYCLE.BIN/ | |
storage/ | ||
vendor/ | ||
build/ | ||
.phpunit.result.cache |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Makefile for Docker Nginx PHP Composer MySQL | ||
|
||
export CURRENT_UID | ||
|
||
CURRENT_UID= $(shell id -u):$(shell id -g) | ||
|
||
help: | ||
@echo "" | ||
@echo "usage: make COMMAND" | ||
@echo "" | ||
@echo "Commands:" | ||
@echo " install Install PHP dependencies with composer" | ||
@echo " update Update PHP dependencies with composer" | ||
@echo " autoload Update PHP autoload files" | ||
@echo " test Run PHPUnit Tests" | ||
@echo " cmd Open terminal with php" | ||
|
||
install: | ||
@docker run --rm \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
grandchef/composer:2.8.2 install --ignore-platform-reqs --no-scripts --no-interaction | ||
|
||
update: | ||
@docker run --rm \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
grandchef/composer:2.8.2 update --no-scripts --no-interaction | ||
|
||
autoload: | ||
@docker run --rm \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
grandchef/composer:2.8.2 dump-autoload --no-scripts --no-interaction | ||
|
||
test: | ||
@docker run --rm -it \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-w /app \ | ||
grandchef/php:8.2.2-fpm-dev php ./vendor/bin/phpunit --configuration . --no-coverage --colors=always | ||
|
||
analisys: | ||
@docker run --rm -it \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
-w /app \ | ||
grandchef/composer:2.8.2 composer analysis | ||
|
||
check: | ||
@docker run --rm -it \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
-w /app \ | ||
grandchef/composer:2.8.2 composer check-style | ||
|
||
fix: | ||
@docker run --rm -it \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
-w /app \ | ||
grandchef/composer:2.8.2 composer psr-fix | ||
|
||
cmd: | ||
@docker run --rm -it \ | ||
-u $(CURRENT_UID) \ | ||
-v $(shell pwd):/app \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /etc/group:/etc/group:ro \ | ||
-w /app \ | ||
grandchef/composer:2.8.2 /bin/bash |
This file contains 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 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
Oops, something went wrong.