|
| 1 | +name: End to End tests command with option |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | +env: |
| 11 | + # see https://github.com/composer/composer/issues/9368#issuecomment-718112361 |
| 12 | + COMPOSER_ROOT_VERSION: "dev-main" |
| 13 | + |
| 14 | +jobs: |
| 15 | + code_analysis: |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + |
| 19 | + name: End to End tests command with option |
| 20 | + runs-on: ubuntu-latest |
| 21 | + timeout-minutes: 10 |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + # see https://github.com/shivammathur/setup-php |
| 27 | + - |
| 28 | + uses: shivammathur/setup-php@v2 |
| 29 | + with: |
| 30 | + php-version: 8.2 |
| 31 | + coverage: none |
| 32 | + |
| 33 | + - uses: "ramsey/composer-install@v3" |
| 34 | + |
| 35 | + # test various commands with options |
| 36 | + - working-directory: e2e/command-with-option |
| 37 | + run: | |
| 38 | + # other command |
| 39 | + ../../bin/rector help |
| 40 | + php ../../bin/rector help |
| 41 | +
|
| 42 | + # with explicit "process" command |
| 43 | + ../../bin/rector process --kaizen 1 --dry-run |
| 44 | + ../../bin/rector process --kaizen=1 --dry-run |
| 45 | + php ../../bin/rector process --kaizen 1 --dry-run |
| 46 | + php ../../bin/rector process --kaizen=1 --dry-run |
| 47 | + ../../bin/rector process some_file.php --kaizen 1 |
| 48 | + ../../bin/rector process some_file.php --kaizen=1 |
| 49 | + php ../../bin/rector process some_file.php --kaizen 1 |
| 50 | + php ../../bin/rector process some_file.php --kaizen=1 |
| 51 | +
|
| 52 | + # with implicit process command |
| 53 | + ../../bin/rector --kaizen 1 --dry-run |
| 54 | + ../../bin/rector --kaizen=1 --dry-run |
| 55 | + php ../../bin/rector --kaizen 1 --dry-run |
| 56 | + php ../../bin/rector --kaizen=1 --dry-run |
| 57 | +
|
| 58 | + ../../bin/rector some_file.php --kaizen 1 |
| 59 | + ../../bin/rector some_file.php --kaizen=1 |
| 60 | + php ../../bin/rector some_file.php --kaizen 1 |
| 61 | + php ../../bin/rector some_file.php --kaizen=1 |
| 62 | +
|
0 commit comments