rector/.github/workflows/test_with_doctrine.yaml
2020-05-02 11:48:32 +02:00

38 lines
1.4 KiB
YAML

name: Test With Doctrine
on:
pull_request: null
push:
branches:
- master
jobs:
test_with_doctrine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
- name: Clone doctrine/orm and install safe dependencies
run: |
# cannot install dev deps (--no-dev), because doctrine/orm might inherit from them in different version
composer install --no-progress --no-dev
# loads autoload-dev packages as well, there are utils that might be used later
git clone https://github.com/doctrine/orm.git --depth 1
# older version have breaking "object" type
composer require doctrine/cache:^1.10 -d orm --no-update
# remove phsptan config to prevent rector loading configs
rm phpstan.neon
rm orm/phpstan.neon.dist
# do not intall doctrine/orm phpstan, it conflicts with Retor's one
composer install -d orm --no-dev
- run: |
bin/rector process orm/lib --config ci/config/rector-doctrine.yaml --autoload-file orm/vendor/autoload.php