Skip to content

Commit

Permalink
Merge pull request #267 from mesilov/dev
Browse files Browse the repository at this point in the history
add vendor ci\cd
  • Loading branch information
mesilov authored Feb 6, 2022
2 parents bf353aa + 2794836 commit 320fb5e
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
run: |
composer phpunit-run-integration-tests
- name: "is integration tests succeeded"
- name: "integration tests succeeded"
if: ${{ success() }}
run: |
echo '✅ integration tests pass, congratulations!'
- name: "is integration tests failed"
- name: "integration tests failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️iteintegration tests failed '
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻ '
60 changes: 60 additions & 0 deletions .github/workflows/vendor-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Vendor integration tests"

on:
# run integration tests from vendor CI\CD pipeline with webhook
repository_dispatch:
types: [ run_vendor_integration_tests ]

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK: ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
TEST2_ENV: 12345

jobs:
tests:
name: "Vendor integration tests"

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.4"
dependencies: [ highest ]

steps:

- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: variables_order=EGPCS
env:
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK: ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
TEST2_ENV: 12345

- name: "Install dependencies"
run: |
composer update ${{ env.COMPOSER_FLAGS }}
- name: "Debug ENV variables"
run: |
printenv
- name: "Run integration tests"
run: |
composer phpunit-run-integration-tests
- name: "integration tests succeeded"
if: ${{ success() }}
run: |
echo '✅ integration tests pass, congratulations!'
- name: "integration tests failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* add `Bitrix24\SDK\Core\BulkItemsReader` for data-intensive applications for bulk export data from Bitrix24, read strategies located in
folder `ReadStrategies`, in services read model **must** use most effective read strategy.
* add integration tests in GitHub Actions pipeline 🎉, now integration tests run on push on `dev-branch`
* add incoming webhook for run integration tests `vendor-check.yml` from vendor CI\CD pipeline

### Changed

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A powerful PHP library for the Bitrix24 REST API

### Build status

| CI\CD [status](https://github.com/mesilov/bitrix24-php-sdk/actions) |
| CI\CD [status](https://github.com/mesilov/bitrix24-php-sdk/actions) on `master` |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![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) |
| [![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) |
Expand Down

0 comments on commit 320fb5e

Please sign in to comment.