forked from OpenMage/magento-lts
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'lts/main'
# Conflicts: # .ddev/commands/web/phpunit # .github/workflows/labeler.yml # .github/workflows/phpstan.yml # .github/workflows/phpunit.yml # .github/workflows/sonar.yml # .github/workflows/syntax-php.yml # .github/workflows/update-copyright.yml # .github/workflows/workflow.yml # .gitignore # .gitpod.yml # .php-cs-fixer.dist.php # .phpcs.php.xml.dist # .phpcs.xml.dist # .phpstan.dist.baseline.neon # .phpstan.dist.neon # app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php # app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php # app/code/core/Mage/Api/Model/Server/Adapter/Jsonrpc.php # app/code/core/Mage/Media/Model/File/Image.php # composer.json # composer.lock # dev/gitpod/docker-compose.yml # dev/tests/unit/Base/ClassLoadingTest.php # dev/tests/unit/Base/XmlFileLoadingTest.php # dev/tests/unit/Mage/Core/Helper/StringTest.php # lib/Varien/Object.php # lib/Varien/Profiler.php # phpunit.xml.dist # tests/sonar-project.properties # tests/unit/Mage/Core/Helper/EnvironmentConfigLoaderTest.php # tests/unit/Mage/Core/Helper/EnvironmentConfigLoaderTestHelper.php # tests/unit/Mage/Core/Helper/SecurityTest.php # tests/unit/Mage/Uploader/Helper/FileTest.php # tests/unit/Varien/Db/Adapter/Pdo/MysqlTest.php
- Loading branch information
Showing
1,493 changed files
with
13,173 additions
and
12,969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
## Description: create local development directory | ||
## Usage: localdev | ||
## Example: ddev localdev <git-url> | ||
|
||
if [ ! -d ".localdev/" ] | ||
then | ||
mkdir ".localdev/" | ||
echo "Directory created." | ||
fi | ||
|
||
if ! grep -q "./.localdev/*" composer.json; then | ||
php vendor/bin/composer config repositories.local '{"type": "path", "url": "./.localdev/*", "canonical": false}' | ||
echo "Patched composer.json." | ||
fi | ||
|
||
cd ".localdev/" || exit | ||
git clone "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
## Description: run PHPSUnit | ||
## Description: run PHPUnit | ||
## Usage: phpunit | ||
## Example: ddev phpunit <path-to-files> | ||
## Example: ddev phpunit | ||
|
||
php vendor/bin/phpunit | ||
php vendor/bin/phpunit --no-coverage "$@" --testdox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
## Description: run PHPUnit with coverage | ||
## Usage: phpunit-coverage | ||
## Example: ddev phpunit-coverage | ||
|
||
enable_xdebug | ||
XDEBUG_MODE=coverage php vendor/bin/phpunit --testdox | ||
disable_xdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
## Description: run PHPUnit with local HTML coverage | ||
## Usage: phpunit-coverage-local | ||
## Example: ddev phpunit-coverage-local | ||
|
||
enable_xdebug | ||
XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-html build/coverage --testdox | ||
disable_xdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Rector | ||
|
||
on: | ||
workflow_call: | ||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
jobs: | ||
rector: | ||
name: Validation | ||
runs-on: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* | ||
|
||
- name: Rector | ||
run: php vendor/bin/rector process --dry-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +0,0 @@ | ||
name: Sonar | ||
|
||
on: | ||
# Run automatically every Monday on midnight. | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
workflow_call: | ||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit: | ||
name: Unit Tests on ${{ matrix.php }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 5 | ||
matrix: | ||
os: [ubuntu-latest] | ||
php: ['8.1', '8.3'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring | ||
tools: composer, pecl, phpcs, phpstan, phpunit:9.5 | ||
ini-values: pcov.directory=api, post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration | ||
coverage: pcov #optional, setup coverage driver | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --dev -n --prefer-source --ignore-platform-req=php+ | ||
|
||
- name: Run Unit Tests | ||
run: phpunit --testsuite=Unit; | ||
|
||
- name: prepare SonarCloud Scan Data | ||
continue-on-error: true | ||
if: ${{ matrix.php == '8.3' }} | ||
run: | | ||
echo $PWD | ||
ls -la | ||
head ./dev/tests/reports/clover.xml | ||
sed -i 's@'$GITHUB_WORKSPACE'/@/github/workspace/@g' ./dev/tests/logs/junit.xml | ||
sed -i 's@'$GITHUB_WORKSPACE'/@/github/workspace/@g' ./dev/tests/reports/clover.xml | ||
head ./dev/tests/reports/clover.xml | ||
ls -la | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
continue-on-error: true | ||
if: ${{ matrix.php == '8.3' }} && SONAR_TOKEN | ||
with: | ||
args: > | ||
-Dproject.settings=tests/sonar-project.properties | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
php: ['8.1', '8.3'] | ||
php: ['7.4', '8.4'] | ||
|
||
name: PHP Syntax ${{ matrix.php }} | ||
|
||
|
Oops, something went wrong.