From 672b339ebdbcb33f07d93ff352eb24382e811efd Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 21 Jan 2022 04:07:25 +0700 Subject: [PATCH] [e2e][scoped] Add e2e global install on scoped (#1704) * [e2e][scoped] Add e2e global install on scoped * rector command to reproduce * clean up comment * wait 70 seconds for deploy to packagist * autoload * clean up * clean up * clean up --- .../.github/workflows/e2e_global.yaml | 40 +++++++++++++++++++ .../e2e/global-install/.gitignore | 1 + .../global-install/App/ExceptionInterface.php | 7 ++++ .../e2e/global-install/composer.json | 8 ++++ .../e2e/global-install/rector.php | 15 +++++++ .../e2e/global-install/src/MyException.php | 13 ++++++ 6 files changed, 84 insertions(+) create mode 100644 build/target-repository/.github/workflows/e2e_global.yaml create mode 100644 build/target-repository/e2e/global-install/.gitignore create mode 100644 build/target-repository/e2e/global-install/App/ExceptionInterface.php create mode 100644 build/target-repository/e2e/global-install/composer.json create mode 100644 build/target-repository/e2e/global-install/rector.php create mode 100644 build/target-repository/e2e/global-install/src/MyException.php diff --git a/build/target-repository/.github/workflows/e2e_global.yaml b/build/target-repository/.github/workflows/e2e_global.yaml new file mode 100644 index 00000000000..a0473fa0bc2 --- /dev/null +++ b/build/target-repository/.github/workflows/e2e_global.yaml @@ -0,0 +1,40 @@ +name: End to End global tests + +on: + pull_request: null + push: + branches: + - main + +jobs: + end_to_end: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php_version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] + directory: + - 'e2e/global-install' + + name: End to end test - ${{ matrix.directory }} + + steps: + - uses: actions/checkout@v2 + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php_version }} + coverage: none + + # wait for deploy to packagist + - run: sleep 70 + + - + run: | + composer global require --dev rector/rector:dev-main + composer install --ansi + working-directory: ${{ matrix.directory }} + + - + run: rector process --ansi --clear-cache + working-directory: ${{ matrix.directory }} diff --git a/build/target-repository/e2e/global-install/.gitignore b/build/target-repository/e2e/global-install/.gitignore new file mode 100644 index 00000000000..49ce3c193f8 --- /dev/null +++ b/build/target-repository/e2e/global-install/.gitignore @@ -0,0 +1 @@ +/vendor \ No newline at end of file diff --git a/build/target-repository/e2e/global-install/App/ExceptionInterface.php b/build/target-repository/e2e/global-install/App/ExceptionInterface.php new file mode 100644 index 00000000000..37d9c23e583 --- /dev/null +++ b/build/target-repository/e2e/global-install/App/ExceptionInterface.php @@ -0,0 +1,7 @@ +parameters(); + $parameters->set(Option::PATHS, [__DIR__ . '/src/']); + + $services = $containerConfigurator->services(); + $services->set(MakeInheritedMethodVisibilitySameAsParentRector::class); +}; diff --git a/build/target-repository/e2e/global-install/src/MyException.php b/build/target-repository/e2e/global-install/src/MyException.php new file mode 100644 index 00000000000..411a6153ca9 --- /dev/null +++ b/build/target-repository/e2e/global-install/src/MyException.php @@ -0,0 +1,13 @@ +