This repository was archived by the owner on Feb 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +60
-14
lines changed Expand file tree Collapse file tree 9 files changed +60
-14
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,15 @@ name: "Integration tests"
22
33on :
44 push :
5+ branches :
6+ - dev
57 pull_request :
68
79env :
810 COMPOSER_FLAGS : " --ansi --no-interaction --no-progress --prefer-dist"
911 BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK : ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
12+ TEST2_ENV : 12345
13+
1014jobs :
1115 tests :
1216 name : " Integration tests"
2024 dependencies : [ highest ]
2125
2226 steps :
27+
2328 - name : " Checkout"
2429 uses : " actions/checkout@v2"
2530
@@ -28,10 +33,29 @@ jobs:
2833 with :
2934 coverage : " none"
3035 php-version : " ${{ matrix.php-version }}"
36+ ini-values : variables_order=EGPCS
37+ env :
38+ BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK : ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
39+ TEST2_ENV : 12345
3140
3241 - name : " Install dependencies"
3342 run : |
3443 composer update ${{ env.COMPOSER_FLAGS }}
3544
36- - name : " run unit tests"
37- run : " composer phpunit-run-integration-tests"
45+ - name : " Debug ENV variables"
46+ run : |
47+ printenv
48+
49+ - name : " Run integration tests"
50+ run : |
51+ composer phpunit-run-integration-tests
52+
53+ - name : " is integration tests succeeded"
54+ if : ${{ success() }}
55+ run : |
56+ echo '✅ integration tests pass, congratulations!'
57+
58+ - name : " is integration tests failed"
59+ if : ${{ failure() }}
60+ run : |
61+ echo '::error:: ❗️iteintegration tests failed '
Original file line number Diff line number Diff line change 4040 run : " composer update --no-interaction --no-progress --no-suggest"
4141
4242 - name : " PHPStan"
43- run : " composer phpstan-analyse"
43+ run : " composer phpstan-analyse"
44+
45+ - name : " is PHPStan check succeeded"
46+ if : ${{ success() }}
47+ run : |
48+ echo '✅ PHPStan check pass, congratulations!'
49+
50+ - name : " is PHPStan check failed"
51+ if : ${{ failure() }}
52+ run : |
53+ echo '::error:: ❗️ PHPStan check failed (╯°益°)╯彡┻━┻'
Original file line number Diff line number Diff line change 3434 composer update ${{ env.COMPOSER_FLAGS }}
3535
3636 - name : " run unit tests"
37- run : " composer phpunit-run-unit-tests"
37+ run : " composer phpunit-run-unit-tests"
38+
39+ - name : " is unit tests tests succeeded"
40+ if : ${{ success() }}
41+ run : |
42+ echo '✅ unit tests pass, congratulations!'
43+
44+ - name : " is unit tests tests failed"
45+ if : ${{ failure() }}
46+ run : |
47+ echo '::error:: ❗️ unit tests tests failed (╯°益°)╯彡┻━┻'
Original file line number Diff line number Diff line change 1818 in ` Bitrix24\SDK\Core\Response::__destruct() `
1919* add ` Bitrix24\SDK\Core\BulkItemsReader ` for data-intensive applications for bulk export data from Bitrix24, read strategies located in
2020 folder ` ReadStrategies ` , in services read model ** must** use most effective read strategy.
21+ * add integration tests in GitHub Actions pipeline 🎉, now integration tests run on push on ` dev-branch `
2122
2223### Changed
2324
Original file line number Diff line number Diff line change @@ -7,8 +7,14 @@ A powerful PHP library for the Bitrix24 REST API
77
88### Build status
99
10- [ ![ phpstan check] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpstan.yml/badge.svg )] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpstan.yml )
11- [ ![ phpunit unit-tests status] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpunit.yml/badge.svg )] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpunit.yml )
10+ | CI\CD [ status] ( https://github.com/mesilov/bitrix24-php-sdk/actions ) |
11+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
12+ | [ ![ phpstan check] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpstan.yml/badge.svg )] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpstan.yml ) |
13+ | [ ![ unit-tests status] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpunit.yml/badge.svg )] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpunit.yml ) |
14+ | [ ![ integration-tests status] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/integration.yml/badge.svg )] ( https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/integration.yml ) |
15+
16+ Integration tests run in GitHub actions with real Bitrix24 portal
17+
1218
1319### BITRIX24-PHP-SDK Documentation
1420
Original file line number Diff line number Diff line change @@ -47,12 +47,6 @@ public static function getBulkItemsReader(): BulkItemsReaderInterface
4747 */
4848 public static function getCore (): CoreInterface
4949 {
50-
51- print (print_r ($ _ENV , true ));
52- print (print_r ($ _ENV ['BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK ' ]));
53- print (print_r ($ _ENV ['BITRIX24_WEBHOOK ' ]));
54- exit ();
55-
5650 return (new CoreBuilder ())
5751 ->withLogger (self ::getLogger ())
5852 ->withWebhookUrl ($ _ENV ['BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK ' ] ?? $ _ENV ['BITRIX24_WEBHOOK ' ])
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public function testSetPropertyItem(): void
2525 };
2626 $ testItem ->ID = 2 ;
2727 }
28+
2829 /**
2930 * @covers \Bitrix24\SDK\Core\Result\AbstractItem::__unset
3031 */
Original file line number Diff line number Diff line change 2020 putenv ('APP_DEBUG= ' . $ _SERVER ['APP_DEBUG ' ] = $ _ENV ['APP_DEBUG ' ] = '0 ' );
2121}
2222
23- (new Dotenv ())->loadEnv (dirname (__DIR__ ). '/tests/.env ' );
23+ (new Dotenv ())->loadEnv (dirname (__DIR__ ) . '/tests/.env ' );
Original file line number Diff line number Diff line change 11APP_ENV = dev
22LOGS_FILE = tools/logs/cli.log
3- LOGS_LEVEL = 200
3+ LOGS_LEVEL = 300
You can’t perform that action at this time.
0 commit comments