Skip to content

Commit 1236386

Browse files
committed
Other GitHub Action for PHPStan
1 parent 2cee5ae commit 1236386

File tree

3 files changed

+32
-25
lines changed

3 files changed

+32
-25
lines changed
File renamed without changes.

.github/workflows/extdn-unit-tests.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/static-tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Magento 2 Static Tests
2+
#on: ['push', 'pull_request']
3+
on:
4+
release:
5+
push:
6+
branches:
7+
- 'main'
8+
9+
jobs:
10+
static-tests:
11+
name: Magento 2 Static Tests
12+
runs-on: self-hosted
13+
#runs-on: ubuntu-latest
14+
container:
15+
image: yireo/magento2installed:2.4.7-p4
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v4
19+
20+
- name: Add module source
21+
run: |
22+
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`
23+
cp -R ${GITHUB_WORKSPACE} /tmp/magento/package-source
24+
cd /tmp/magento
25+
composer config repositories.local-source path package-source/
26+
composer require --prefer-source -- ${COMPOSER_NAME}:@dev bitexpert/phpstan-magento
27+
28+
- name: Run Magento 2 PHPStan Tests
29+
run: |
30+
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`
31+
php -d memory_limit=4G ./vendor/bin/phpstan analyse ./vendor/$COMPOSER_NAME/
32+

0 commit comments

Comments
 (0)