8000 Merge branch '5.2' into 5.x · symfony/symfony@008f280 · GitHub
[go: up one dir, main page]

Skip to content

Commit 008f280

Browse files
Merge branch '5.2' into 5.x
* 5.2: [Cache] Add server-commands support for Predis Replication Environments Speedup psalm
2 parents 64b7696 + 2068652 commit 008f280

File tree

6 files changed

+274
-291
lines changed

6 files changed

+274
-291
lines changed
File renamed without changes.

.github/workflows/intl-data-tests.yml

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,50 @@
11
name: Intl data tests
22

33
on:
4-
push:
5-
paths:
6-
- 'src/Symfony/Component/Intl/Resources/data/**'
7-
pull_request:
8-
paths:
9-
- 'src/Symfony/Component/Intl/Resources/data/**'
4+
push:
5+
paths:
6+
- 'src/Symfony/Component/Intl/Resources/data/**'
7+
pull_request:
8+
paths:
9+
- 'src/Symfony/Component/Intl/Resources/data/**'
1010

11-
jobs:
11+
defaults:
12+
run:
13+
shell: bash
1214

13-
tests:
14-
name: Tests (intl-data)
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v2
20-
21-
- name: Define the ICU version
22-
run: |
23-
SYMFONY_ICU_VERSION=$(php -r 'require "src/Symfony/Component/Intl/Intl.php"; echo Symfony\Component\Intl\Intl::getIcuStubVersion();')
24-
echo "SYMFONY_ICU_VERSION=$SYMFONY_ICU_VERSION" >> $GITHUB_ENV
25-
26-
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
28-
with:
29-
coverage: "none"
30-
extensions: "zip,intl-${{env.SYMFONY_ICU_VERSION}}"
31-
ini-values: "memory_limit=-1"
32-
php-version: "7.4"
33-
34-
- name: Install dependencies
35-
run: |
36-
echo "::group::composer update"
37-
composer update --no-progress --no-suggest --ansi
38-
echo "::endgroup::"
39-
echo "::group::install phpunit"
40-
./phpunit install
41-
echo "::endgroup::"
42-
43-
- name: Report the ICU version
44-
run: icu-config --version && php -i | grep 'ICU version'
45-
46-
- name: Run intl-data tests
47-
run: ./phpunit --group intl-data -v
15+
jobs:
16+
tests:
17+
name: Tests (intl-data)
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Define the ICU version
25+
run: |
26+
SYMFONY_ICU_VERSION=$(php -r 'require "src/Symfony/Component/Intl/Intl.php"; echo Symfony\Component\Intl\Intl::getIcuStubVersion();')
27+
echo "SYMFONY_ICU_VERSION=$SYMFONY_ICU_VERSION" >> $GITHUB_ENV
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
coverage: "none"
33+
extensions: "zip,intl-${{env.SYMFONY_ICU_VERSION}}"
34+
ini-values: "memory_limit=-1"
35+
php-version: "7.4"
36+
37+
- name: Install dependencies
38+
run: |
39+
echo "::group::composer update"
40+
composer update --no-progress --no-suggest --ansi
41+
echo "::endgroup::"
42+
echo "::group::install phpunit"
43+
./phpunit install
44+
echo "::endgroup::"
45+
46+
- name: Report the ICU version
47+
run: icu-config --version && php -i | grep 'ICU version'
48+
49+
- name: Run intl-data tests
50+
run: ./phpunit --group intl-data -v

.github/workflows/psalm.yml

Lines changed: 23 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Static analysis
33
on:
44
pull_request: ~
55

6+
defaults:
7+
run:
8+
shell: bash
9+
610
jobs:
711
psalm:
812
name: Psalm
@@ -17,81 +21,38 @@ jobs:
1721
ini-values: "memory_limit=-1"
1822
coverage: none
1923

20-
- name: Checkout PR
24+
- name: Checkout target branch
2125
uses: actions/checkout@v2
2226
with:
23-
path: pr
27+
ref: ${{ github.base_ref }}
2428

25-
- name: Checkout base
29+
- name: Checkout PR
2630
uses: actions/checkout@v2
27-
with:
28-
ref: ${{ github.base_ref }}
29-
path: base
3031

3132
- name: Configure composer
3233
run: |
33-
cd base
34-
COMPOSER_HOME="$(composer config home)"
35-
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
36-
echo "COMPOSER_ROOT_VERSION=$(grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
37-
38-
- name: Determine composer cache directory
39-
id: composer-cache
40-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
41-
42-
- name: Cache composer dependencies
43-
uses: actions/cache@v2
44-
with:
45-
path: ${{ steps.composer-cache.outputs.dir }}
46-
key: composer-${{ github.base_ref }}
47-
restore-keys: composer-
34+
COMPOSER_HOME="$(composer config home)"
35+
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
36+
echo "COMPOSER_ROOT_VERSION=$(grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
4837
4938
- name: Install Psalm
5039
run: |
51-
composer require psalm/phar
52-
cp ./vendor/bin/psalm.phar base/psalm.phar
53-
cp ./vendor/bin/psalm.phar pr/psalm.phar
54-
55-
- name: Install dependencies for base
56-
run: |
57-
cd base
58-
echo "::group::modify composer.json"
59-
composer remove symfony/phpunit-bridge --no-interaction --no-update
60-
composer require --no-update phpunit/phpunit php-http/discovery psr/event-dispatcher
61-
echo "::endgroup::"
62-
echo "::group::composer update"
63-
composer update --no-progress --ansi
64-
echo "::endgroup::"
40+
echo "::group::modify composer.json"
41+
composer remove --no-update --no-interaction symfony/phpunit-bridge
42+
composer require --no-update psalm/phar phpunit/phpunit php-http/discovery psr/event-dispatcher
43+
echo "::endgroup::"
44+
echo "::group::composer update"
45+
composer update --no-progress --ansi
46+
git checkout composer.json
47+
echo "::endgroup::"
48+
./vendor/bin/psalm.phar --version
6549
6650
- name: Generate Psalm baseline
6751
run: |
68-
cd base
69-
./psalm.phar --set-baseline=.github/psalm/psalm.baseline.xml --no-progress
70-
71-
- name: Copy baseline
72-
run: |
73-
cp base/.github/psalm/psalm.baseline.xml pr/.github/psalm/psalm.baseline.xml
74-
75-
- name: Install dependencies for PR
76-
run: |
77-
cd pr
78-
echo "::group::modify composer.json"
79-
composer remove symfony/phpunit-bridge --no-interaction --no-update
80-
composer require --no-update phpunit/phpunit php-http/discovery psr/event-dispatcher
81-
echo "::endgroup::"
82-
echo "::group::composer update"
83-
composer update --no-progress --ansi
84-
echo "::endgroup::"
85-
86-
- name: Cache Psalm
87-
uses: actions/cache@v2
88-
with:
89-
path: pr/.github/psalm/cache/
90-
key: psalm-${{ github.base_ref }}
91-
restore-keys: psalm-
52+
git checkout -m ${{ github.base_ref }}
53+
./vendor/bin/psalm.phar --set-baseline=.github/psalm/psalm.baseline.xml --no-progress
54+
git checkout -m FETCH_HEAD
9255
9356
- name: Psalm
9457
run: |
95-
cd pr
96-
./psalm.phar --version
97-
./psalm.phar --output-format=github --no-progress
58+
./vendor/bin/psalm.phar --output-format=github --no-progress

0 commit comments

Comments
 (0)
0