Skip to content

Commit

Permalink
put the rector test in a dedicated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharhamel committed Sep 3, 2020
1 parent aa7aae7 commit 039c353
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/auto-regenerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ jobs:
run: "composer install --no-interaction"
working-directory: "generator"

- name: "Install dependencies with composer in root directory"
run: "composer install --no-interaction"


- name: "Dump autoloader with composer in root directory"
run: "composer dump-autoload"


- name: "Regenerate files"
run: "./safe.php generate"
working-directory: "generator"
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ jobs:
exit 1;
fi
- name: "Check if refactoring can be done with rector/rector:~0.7.0"
run: "composer install && composer rector && composer test"
working-directory: "generator/tests/rector/0.7"

- name: "Archive code coverage results"
uses: "actions/upload-artifact@v1"
with:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/rector-continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Rector Continuous Integration"

on:
- "pull_request"
- "push"

jobs:

rector-continuous-integration:
name: "Check if refactoring can be done with rector/rector:~0.7.0"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"

dependencies:
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"

- name: "Composer install"
run: "composer install && composer rector && composer test"
working-directory: "generator/tests/rector/0.7"

- name: "Run rector"
run: "composer rector"
working-directory: "generator/tests/rector/0.7"

- name: "Run tests"
run: "composer test"
working-directory: "generator/tests/rector/0.7"

0 comments on commit 039c353

Please sign in to comment.