-
-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
206 additions
and
176 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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
|
||
.env | ||
.gitlab-ci.yml | ||
.travis.yml | ||
.editorconfig | ||
.phpstorm.meta.php | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,140 @@ | ||
name: Code_Checks | ||
|
||
on: | ||
pull_request: | ||
pull_request: null | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: ['7.3', '7.4'] | ||
|
||
name: PHP ${{ matrix.php }} tests | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: vendor/bin/phpunit | ||
|
||
test_lowest_dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --depth=100000 origin | ||
|
||
# see https://github.com/shivammathur/setup-php | ||
- uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none | ||
|
||
- run: composer update --no-progress --prefer-lowest | ||
- run: vendor/bin/phpunit | ||
|
||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: | | ||
composer install --no-progress | ||
composer phpstan | ||
- uses: actions/checkout@v2 | ||
- | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: composer phpstan | ||
|
||
ecs: | ||
name: ECS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: | | ||
composer install --no-progress | ||
composer check-cs | ||
- uses: actions/checkout@v2 | ||
- | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: composer check-cs | ||
|
||
rector: | ||
name: Rector | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
- run: | | ||
composer install --no-progress | ||
composer rector | ||
- uses: actions/checkout@v2 | ||
- | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: composer rector | ||
|
||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: | | ||
composer install --no-progress | ||
composer check-docs | ||
- uses: actions/checkout@v2 | ||
- | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: composer check-docs | ||
|
||
simple-checks: | ||
name: Simple checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: | | ||
composer install --no-progress | ||
- uses: actions/checkout@v2 | ||
- | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: | | ||
php ci/check_services_in_yaml_configs.php | ||
php ci/run_all_sets.php | ||
fatal-scan: | ||
name: Scan Fatal Errors | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
- run: | | ||
composer install --no-progress | ||
bin/rector scan-fatal-errors tests/Source/FatalErrors | ||
- uses: actions/checkout@v2 | ||
- | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: bin/rector scan-fatal-errors tests/Source/FatalErrors | ||
|
||
code_coverage: | ||
name: "Code Coverage" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
|
||
- run: composer install --no-progress | ||
|
||
- run: | | ||
phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit --coverage-clover coverage.xml | ||
# Coveralls.io | ||
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar | ||
php php-coveralls.phar --verbose | ||
env: | ||
COVERALLS_REPO_TOKEN: 'Ew7FYsOKM3T3s1nEsPHJkSe6jdVIFHME8' |
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,63 @@ | ||
name: Rector_PHAR | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# see https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32163/highlight/true#M1024 | ||
get_tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
|
||
compile_and_deploy_rector_phar: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
|
||
- run: | | ||
cd compiler | ||
composer install | ||
- run: | | ||
cd compiler | ||
bin/compile | ||
- run: | | ||
# remove local vendor, to prevent duplicated content | ||
rm -rf vendor | ||
tmp/rector.phar | ||
- | ||
name: '' | ||
run: | | ||
git clone https://${ACCESS_TOKEN}@github.com/rectorphp/rector-prefixed.git rector-prefixed > /dev/null 2>&1 | ||
cp tmp/rector.phar rector-prefixed/rector.phar | ||
cp tmp/rector.phar rector-prefixed/rector | ||
cd rector-prefixed | ||
git config user.name "TomasVotruba" | ||
git config user.email "tomas.vot@gmail.com" | ||
git add rector rector.phar | ||
if [ "${CURRENT_TAG}" != "" ]; then COMMIT_MSG="Rector ${CURRENT_TAG}"; else COMMIT_MSG="Updated Rector to commit ${GITHUB_SHA}"; fi | ||
git commit -m "${COMMIT_MSG}" | ||
git push --quiet origin master | ||
if [ "${CURRENT_TAG}" != "" ]; then git tag "${CURRENT_TAG}" && git push --quiet origin ${CURRENT_TAG}; fi | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
CURRENT_TAG: ${{ steps.get_version.outputs.VERSION }} |
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,42 @@ | ||
name: Standalone_Run | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
standalone_run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.2 | ||
coverage: none # disable xdebug, pcov | ||
|
||
# Run standalone install in non-root package, ref https://github.com/rectorphp/rector/issues/732 | ||
- run: | ||
# 1. install locally | ||
mkdir test-paths | ||
cd test-paths | ||
|
||
mkdir rector-dir | ||
composer require rector/rector:@dev -d rector-dir | ||
|
||
mkdir symfony-demo-dir | ||
composer create-project symfony/symfony-demo symfony-demo-dir --dev | ||
|
||
# missing for some reason | ||
composer require doctrine/doctrine-fixtures-bundle -d symfony-demo-dir | ||
composer dump-autoload --no-dev -d symfony-demo-dir | ||
|
||
# 2. run an another project | ||
rector-dir/vendor/bin/rector | ||
|
||
cd symfony-demo-dir | ||
../rector-dir/vendor/bin/rector | ||
|
||
# --hide-autoload-errors due to skipped dev deps and mixes tests in /src | ||
../rector-dir/vendor/bin/rector process src --set code-quality --hide-autoload-errors --dry-run |
Oops, something went wrong.