-
Notifications
You must be signed in to change notification settings - Fork 74
51 lines (43 loc) · 2.1 KB
/
packagist_package_run_rector.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: packagist_package_run_rector
# This test will run on every pull request, and on every commit that is pushed to master
on:
pull_request: null
push:
branches:
- master
jobs:
create_drupal_artifact_and_run_rector:
name: Create Drupal artifact and run Rector
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"
# Uncomment to enable SSH access to Github Actions - https://github.com/marketplace/actions/debugging-with-tmate#getting-started
# - name: Debugging with tmate
# uses: mxschmitt/action-tmate@v2
- run: |
# Download the latest Drupal core project and all its dependencies
composer create-project drupal/recommended-project drupal --no-progress
- run: |
# Install drupal-rector:dev-master from Github
cd drupal
# Set composer to get code from Github repo instead of Packagist (master does not exist on Packagist)
composer config repositories.drupal-rector '{"type": "vcs", "url": "https://github.com/palantirnet/drupal-rector.git"}'
composer require palantirnet/drupal-rector:dev-master --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