Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/drupal_rector_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: drupal_rector_examples

on:
pull_request: null
push:
branches:
- master

jobs:
drupal_rector_examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 7.3
coverage: none # disable xdebug, pcov
extensions: "intl"

# Run standalone install in non-root package, ref https://github.com/rectorphp/rector/issues/732
- run: |
# Download the latest Drupal core project and all its dependencies
composer create-project drupal/recommended-project drupal --dev --no-progress

- run: |
# Install drupal-rector
cd drupal
composer require palantirnet/drupal-rector --no-progress

- run: |
# Prepare rector config files with Drupal specific settings
cd drupal
cp vendor/palantirnet/drupal-rector/rector.yml .

- run: |
# Prepare rector_examples folder in the drupal modules directory
cd drupal
mkdir -p web/modules/custom
cp -r vendor/palantirnet/drupal-rector/rector_examples web/modules/custom/.

- run: |
# Run Rector
cd drupal
vendor/bin/rector process web/modules/custom/rector_examples --debug