-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR was merged into the 2.1-dev branch. Discussion ---------- | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Fixed tickets | Closes #102 | License | MIT (Recreated from #103) but on the main repository to trigger the workflow 😄 Commits ------- db8bb58 Allow PHP 8
- Loading branch information
Showing
4 changed files
with
132 additions
and
62 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,99 @@ | ||
name: Full CI process | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: PHP ${{ matrix.PHP_VERSION }} | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- PHP_VERSION: '7.1' | ||
SYMFONY_REQUIRE: '^3.4' | ||
- PHP_VERSION: '7.2' | ||
SYMFONY_REQUIRE: '^4.4' | ||
- PHP_VERSION: '7.3' | ||
SYMFONY_REQUIRE: '^5.0' | ||
- PHP_VERSION: '7.4' | ||
SYMFONY_REQUIRE: '^5.2' | ||
- PHP_VERSION: '8.0' | ||
|
||
steps: | ||
# —— Setup Github actions 🐙 ————————————————————————————————————————————— | ||
# https://github.com/actions/checkout (official) | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# https://github.com/shivammathur/setup-php (community) | ||
- | ||
name: Setup PHP, extensions and composer with shivammathur/setup-php | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.PHP_VERSION }} | ||
extensions: mbstring, ctype, iconv, bcmath, filter, json | ||
coverage: none | ||
env: | ||
update: true | ||
|
||
# —— Composer 🧙️ ————————————————————————————————————————————————————————— | ||
- | ||
name: Install Composer dependencies | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.SYMFONY_REQUIRE }} | ||
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 | ||
SYMFONY_PHPUNIT_REMOVE: "symfony/yaml" | ||
SYMFONY_PHPUNIT_VERSION: '7.5.6' | ||
run: | | ||
git config --global author.name Sebastiaan Stok | ||
git config --global author.email [email protected] | ||
git config --global user.name Sebastiaan Stok | ||
git config --global user.email [email protected] | ||
rm -f composer.lock | ||
composer global require symfony/flex | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi | ||
## —— Tests ✅ ——————————————————————————————————————————————————————————— | ||
- | ||
name: Run Tests | ||
run: | | ||
make test | ||
lint: | ||
name: PHP-QA | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# https://github.com/shivammathur/setup-php (community) | ||
- | ||
name: Setup PHP, extensions and composer with shivammathur/setup-php | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, ctype, iconv, bcmath, filter, json | ||
coverage: none | ||
|
||
# —— Composer 🧙️ ————————————————————————————————————————————————————————— | ||
- | ||
name: Install Composer dependencies | ||
run: | | ||
rm -f composer.lock | ||
composer global require symfony/flex | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi | ||
- | ||
name: Run PHP-QA | ||
run: | | ||
make cs-full |
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,32 @@ | ||
QA_DOCKER_IMAGE=jakzal/phpqa:1.34.1-php7.4-alpine | ||
QA_DOCKER_COMMAND=docker run --init -t --rm --user "$(shell id -u):$(shell id -g)" --volume /tmp/tmp-phpqa-$(shell id -u):/tmp --volume "$(shell pwd):/project" --workdir /project ${QA_DOCKER_IMAGE} | ||
|
||
dist: install cs-full phpstan test-full | ||
lint: install security-check cs-full phpstan | ||
|
||
install: | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --prefer-dist --ansi | ||
|
||
test: | ||
./vendor/bin/simple-phpunit --verbose | ||
|
||
# Linting tools | ||
security-check: ensure | ||
sh -c "${QA_DOCKER_COMMAND} security-checker security:check ./composer.lock" | ||
|
||
phpstan: ensure | ||
sh -c "${QA_DOCKER_COMMAND} phpstan analyse --configuration phpstan.neon" | ||
|
||
cs: ensure | ||
sh -c "${QA_DOCKER_COMMAND} php-cs-fixer fix -vvv --diff" | ||
|
||
cs-full: ensure | ||
sh -c "${QA_DOCKER_COMMAND} php-cs-fixer fix -vvv --using-cache=false --diff" | ||
|
||
cs-full-check: ensure | ||
sh -c "${QA_DOCKER_COMMAND} php-cs-fixer fix -vvv --using-cache=false --diff --dry-run" | ||
|
||
ensure: | ||
mkdir -p ${HOME}/.composer /tmp/tmp-phpqa-$(shell id -u) | ||
|
||
.PHONY: install test phpstan cs cs-full cs-full-check |
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 |
---|---|---|
|
@@ -14,17 +14,13 @@ | |
"name": "Sebastiaan Stok", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Luis Cordova", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Community contributions", | ||
"homepage": "https://github.com/rollerworks/PasswordStrengthBundle/contributors" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.1", | ||
"php": ">=7.1", | ||
"rollerworks/password-strength-validator": "^1.0.1", | ||
"symfony/framework-bundle": "^3.4.22 || ^4.0 || ^5.0" | ||
}, | ||
|