-
-
Notifications
You must be signed in to change notification settings - Fork 356
60 lines (50 loc) · 1.88 KB
/
packages_tests.yaml
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
52
53
54
55
56
57
58
59
60
# builds the content of https://github.com/rectorphp/rector-prefixed
# inspiration from https://github.com/phpstan/phpstan-src/blob/master/.github/workflows/phar.yml
name: Packages Tests
on:
pull_request: null
push:
branches:
- main
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
packages_tests:
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
fail-fast: false
matrix:
repository_name:
# must be repository name, e.g. https://github.com/rectorphp/rector-symfony
- rectorphp/rector-symfony
- rectorphp/rector-phpunit
- rectorphp/rector-doctrine
- rectorphp/rector-downgrade-php
actions:
-
name: 'Unit Tests'
run: vendor/bin/phpunit
-
name: 'PHPStan'
run: vendor/bin/phpstan
steps:
# see https://github.com/actions/checkout#usage
-
uses: "actions/checkout@v4"
with:
repository: ${{ matrix.repository_name }}
ref: "main"
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
- run: composer config minimum-stability dev
# test with current commit in a pull-request
-
run: composer require rector/rector-src dev-main#${{github.event.pull_request.head.sha}} --no-update
if: ${{ github.event_name == 'pull_request' }}
- run: composer install --ansi
- run: ${{ matrix.actions.run }}