Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub integration workflow and remove local .env file #24

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/integration-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "Integration tests"

on:
push:
branches:
- v4
- master

env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
LOYALTY_API_ENDPOINT_URL: ${{ secrets.LOYALTY_API_ENDPOINT_URL }}
LOYALTY_API_CLIENT_ID: ${{ secrets.LOYALTY_API_CLIENT_ID }}
LOYALTY_API_ADMIN_KEY: ${{ secrets.LOYALTY_API_ADMIN_KEY }}

jobs:
tests:
name: "Integration tests"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
dependencies: [ highest ]
operating-system: [ ubuntu-latest, windows-latest ]

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 }}

- name: "Install dependencies"
run: |
composer update ${{ env.COMPOSER_FLAGS }}

- name: "Debug ENV variables"
run: |
printenv

- name: "Run integration tests"
run: |
php vendor/bin/phpunit --colors=always --testsuite integration-tests

- name: "integration tests succeeded"
if: ${{ success() }}
run: |
echo '✅ integration tests pass, congratulations!'

- name: "integration tests failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻ '
23 changes: 0 additions & 23 deletions tests/.env.local

This file was deleted.