Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Nov 12, 2024
1 parent bae8ac0 commit ae74614
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.3']
php-versions: ['7.4']
mysql_version: ['8.0']

services:
mysql:
image: mysql:${{ matrix.mysql_version }}
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: magento_test_db
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Setup PHP
Expand All @@ -36,7 +47,29 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
run: composer install --prefer-dist --no-progress

- name: Validate mysql service
run: |
echo "Checking mysql service"
sudo apt-get install -y mysql-client
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uroot -proot -e "SHOW DATABASES"
- name: Install OpenMage
run: |
php bin/n98-magerun --no-interaction install \
--magentoVersionByName="openmage-${{ matrix.openmage_version }}" \
--installationFolder="./magento" \
--dbHost="127.0.0.1" \
--dbPort="${{ job.services.mysql.ports['3306'] }}" \
--dbUser="root" \
--dbPass="root" \
--dbName="magento_test_db" \
--installSampleData=no \
--useDefaultConfigParams=yes \
--baseUrl="http://magento.local/"
env:
COMPOSER_VENDOR_PATH : ${{ github.workspace }}/magento/vendor

- name: PHPStan Static Analysis
run: XDEBUG_MODE=off php vendor/bin/phpstan.phar analyze
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ act.secrets
/docs/

# php-cs-fixer cache
/.php-cs-fixer.cache
/.php-cs-fixer.cache

# phpunit cache
/.phpunit.result.cache
File renamed without changes.
2 changes: 1 addition & 1 deletion phpstan.dist.neon → .phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- phpstan.dist.baseline.neon
- .phpstan.dist.baseline.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
paths:
Expand Down

0 comments on commit ae74614

Please sign in to comment.