Skip to content

Commit

Permalink
Let's try to run integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k3lm committed Dec 27, 2023
1 parent f4b271a commit f9542d7
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,20 @@ jobs:
process: 'unit-test'
unit_test_config: 'dev/tests/unit/phpunit.xml.dist'
unit_test_subset_path: '../Sequra_Core/'


# Integrations tests
- name: "ls directory"
run: ls -la
- name: "copy integration test's phpunit.xml"
run: cp Sequra_Core/Test/Integration/phpunit.xml.dist dev/tests/integration/phpunit.xml
- name: 'To run all test in phpunit.xml'
uses: MAD-I-T/magento-actions@master
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'integration-test'
elasticsearch: 1

- name: 'phpstan'
if: always()
uses: MAD-I-T/magento-actions@v3.20
Expand Down
101 changes: 101 additions & 0 deletions Test/Integration/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
colors="true"
columns="max"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="./framework/bootstrap.php"
stderr="true"
testSuiteLoaderClass="Magento\TestFramework\SuiteLoader"
testSuiteLoaderFile="framework/Magento/TestFramework/SuiteLoader.php">
<coverage>
<include>
<directory suffix=".php">../../../app/code/Magento</directory>
<directory suffix=".php">../../../lib/internal/Magento</directory>
</include>
<exclude>
<directory>../../../app/code/*/*/Test</directory>
<directory>../../../lib/internal/*/*/Test</directory>
<directory>../../../lib/internal/*/*/*/Test</directory>
<directory>../../../setup/src/*/*/Test</directory>
</exclude>
</coverage>
<!-- Test suites definition -->
<testsuites>
<testsuite name="Magento Integration Tests">
<file>testsuite/Magento/IntegrationTest.php</file>
</testsuite>
<!-- Memory tests run first to prevent influence of other tests on accuracy of memory measurements -->
<testsuite name="Memory Usage Tests">
<file>testsuite/Magento/MemoryUsageTest.php</file>
</testsuite>
<testsuite name="Magento Integration Tests">
<directory suffix="Test.php">../../../app/code/Vendor/Sequra_Core/Test/Integration</directory>
</testsuite>
</testsuites>
<!-- Code coverage filters -->
<!-- PHP INI settings and constants definition -->
<php>
<includePath>.</includePath>
<includePath>testsuite</includePath>
<ini name="date.timezone" value="America/Los_Angeles"/>
<ini name="xdebug.max_nesting_level" value="200"/>
<!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
<const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/>
<!-- Local XML post installation configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
<const name="TESTS_POST_INSTALL_SETUP_COMMAND_CONFIG_FILE" value="etc/post-install-setup-command-config.php"/>
<!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
<const name="TESTS_GLOBAL_CONFIG_FILE" value="etc/config-global.php"/>
<!-- Semicolon-separated 'glob' patterns, that match global XML configuration files -->
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
<!-- Whether to cleanup the application before running tests or not -->
<const name="TESTS_CLEANUP" value="enabled"/>
<!-- Memory usage and estimated leaks thresholds -->
<!--<const name="TESTS_MEM_USAGE_LIMIT" value="1024M"/>-->
<const name="TESTS_MEM_LEAK_LIMIT" value=""/>
<!-- Path to Percona Toolkit bin directory -->
<!--<const name="PERCONA_TOOLKIT_BIN_DIR" value=""/>-->
<!-- CSV Profiler Output file -->
<!--<const name="TESTS_PROFILER_FILE" value="profiler.csv"/>-->
<!-- Bamboo compatible CSV Profiler Output file name -->
<!--<const name="TESTS_BAMBOO_PROFILER_FILE" value="profiler.csv"/>-->
<!-- Metrics for Bamboo Profiler Output in PHP file that returns array -->
<!--<const name="TESTS_BAMBOO_PROFILER_METRICS_FILE" value="../../build/profiler_metrics.php"/>-->
<!-- Whether to output all CLI commands executed by the bootstrap and tests -->
<const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>
<!-- Magento mode for tests execution. Possible values are "default", "developer" and "production". -->
<const name="TESTS_MAGENTO_MODE" value="developer"/>
<!-- Minimum error log level to listen for. Possible values: -1 ignore all errors, and level constants form http://tools.ietf.org/html/rfc5424 standard -->
<const name="TESTS_ERROR_LOG_LISTENER_LEVEL" value="-1"/>
<!-- Connection parameters for MongoDB library tests -->
<!--<const name="MONGODB_CONNECTION_STRING" value="mongodb://localhost:27017"/>-->
<!--<const name="MONGODB_DATABASE_NAME" value="magento_integration_tests"/>-->
<!-- Connection parameters for RabbitMQ tests -->
<!--<const name="RABBITMQ_MANAGEMENT_PROTOCOL" value="https"/>-->
<!--<const name="RABBITMQ_MANAGEMENT_PORT" value="15672"/>-->
<!--<const name="RABBITMQ_VIRTUALHOST" value="/"/>-->
<!--<const name="TESTS_PARALLEL_RUN" value="1"/>-->
<const name="USE_OVERRIDE_CONFIG" value="enabled"/>
</php>
<!-- Test listeners -->
<listeners>
<!-- Run after AllureAdapter to allow it to initialize properly -->
<listener class="Magento\TestFramework\Event\PhpUnit"/>
<listener class="Magento\TestFramework\ErrorLog\Listener"/>
</listeners>
<extensions>
<extension class="Qameta\Allure\PHPUnit\AllureExtension">
<!-- Optional arguments block; omit it if you want to use default values -->
<arguments>
<!-- Path to config file (default is config/allure.config.php) -->
<string>allure/allure.config.php</string>
</arguments>
</extension>
</extensions>
</phpunit>

0 comments on commit f9542d7

Please sign in to comment.