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"
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - dev
5
7
pull_request :
6
8
7
9
env :
8
10
COMPOSER_FLAGS : " --ansi --no-interaction --no-progress --prefer-dist"
9
11
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK : ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
12
+ TEST2_ENV : 12345
13
+
10
14
jobs :
11
15
tests :
12
16
name : " Integration tests"
20
24
dependencies : [ highest ]
21
25
22
26
steps :
27
+
23
28
- name : " Checkout"
24
29
uses : " actions/checkout@v2"
25
30
@@ -28,10 +33,29 @@ jobs:
28
33
with :
29
34
coverage : " none"
30
35
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
31
40
32
41
- name : " Install dependencies"
33
42
run : |
34
43
composer update ${{ env.COMPOSER_FLAGS }}
35
44
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 40
40
run : " composer update --no-interaction --no-progress --no-suggest"
41
41
42
42
- 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 34
34
composer update ${{ env.COMPOSER_FLAGS }}
35
35
36
36
- 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 18
18
in ` Bitrix24\SDK\Core\Response::__destruct() `
19
19
* add ` Bitrix24\SDK\Core\BulkItemsReader ` for data-intensive applications for bulk export data from Bitrix24, read strategies located in
20
20
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 `
21
22
22
23
### Changed
23
24
Original file line number Diff line number Diff line change @@ -7,8 +7,14 @@ A powerful PHP library for the Bitrix24 REST API
7
7
8
8
### Build status
9
9
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
+
12
18
13
19
### BITRIX24-PHP-SDK Documentation
14
20
Original file line number Diff line number Diff line change @@ -47,12 +47,6 @@ public static function getBulkItemsReader(): BulkItemsReaderInterface
47
47
*/
48
48
public static function getCore (): CoreInterface
49
49
{
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
-
56
50
return (new CoreBuilder ())
57
51
->withLogger (self ::getLogger ())
58
52
->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
25
25
};
26
26
$ testItem ->ID = 2 ;
27
27
}
28
+
28
29
/**
29
30
* @covers \Bitrix24\SDK\Core\Result\AbstractItem::__unset
30
31
*/
Original file line number Diff line number Diff line change 20
20
putenv ('APP_DEBUG= ' . $ _SERVER ['APP_DEBUG ' ] = $ _ENV ['APP_DEBUG ' ] = '0 ' );
21
21
}
22
22
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 1
1
APP_ENV = dev
2
2
LOGS_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