Skip to content

Commit be03e74

Browse files
committed
Use same installation approach in phpstan action as in phpunit action
1 parent b8a7040 commit be03e74

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ on:
99
jobs:
1010
phpstan:
1111

12-
name: PHPStan
12+
name: PHPStan Static Analysis
1313
runs-on: ubuntu-latest
1414

1515
steps:
1616
- uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '7.4'
22+
23+
- name: Validate composer.json and composer.lock
24+
run: composer validate --strict
25+
1726
- name: Cache Composer packages
1827
id: composer-cache
1928
uses: actions/cache@v2
@@ -22,16 +31,12 @@ jobs:
2231
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
2332
restore-keys: |
2433
${{ runner.os }}-php-
25-
- name: Composer install
26-
uses: php-actions/composer@v6
27-
with:
28-
php_version: 7.4
2934
30-
- name: PHPStan Static Analysis
31-
uses: php-actions/phpstan@v3
32-
with:
33-
php_version: 7.4
34-
configuration: phpstan.neon
35+
- name: Install dependencies
36+
run: composer global config http-basic.repo.magento.com ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }} ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }} && composer install --prefer-dist --no-progress
37+
38+
- name: Run PHPStan
39+
run: vendor/bin/phpstan
3540

3641
unit-tests:
3742

@@ -48,9 +53,6 @@ jobs:
4853
extensions: mbstring, intl
4954
coverage: xdebug
5055

51-
- name: Validate composer.json and composer.lock
52-
run: composer validate --strict
53-
5456
- name: Cache Composer packages
5557
id: composer-cache
5658
uses: actions/cache@v2

0 commit comments

Comments
 (0)