Skip to content

Merge pull request #2720 from bakaphp/hotfix/branch-listing #8346

Merge pull request #2720 from bakaphp/hotfix/branch-listing

Merge pull request #2720 from bakaphp/hotfix/branch-listing #8346

name: static analysis
on: ["push"]
jobs:
run-tests:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, swoole, igbinary, msgpack, redis
APP_ENV: testing
DB_HOST: 127.0.0.1
REDIS_URL: tcp://127.0.0.1:6379?database=0
REDIS_HOST: 127.0.0.1
DB_USERNAME: root
DB_PASSWORD: password
DB_DATABASE: kanvas
DB_INVENTORY_DATABASE: inventory
DB_INVENTORY_USERNAME: root
DB_INVENTORY_PASSWORD: password
DB_SOCIAL_DATABASE: social
DB_SOCIAL_USERNAME: root
DB_SOCIAL_PASSWORD: password
DB_CRM_DATABASE: crm
DB_CRM_USERNAME: root
DB_CRM_PASSWORD: password
DB_WORKFLOW_DATABASE: workflows
DB_WORKFLOW_USERNAME: root
DB_WORKFLOW_PASSWORD: password
DB_ACTION_ENGINE_DATABASE: action_engine
DB_ACTION_ENGINE_USERNAME: root
DB_ACTION_ENGINE_PASSWORD: password
DB_COMMERCE_DATABASE: commerce
DB_COMMERCE_USERNAME: root
DB_COMMERCE_PASSWORD: password
DB_EVENT_DATABASE: event
DB_EVENT_USERNAME: root
DB_EVENT_PASSWORD: password
KANVAS_APP_ID: 059ddaaf-89b5-4158-a85a-90cbd69aa34b
APP_KEY: base64:Wm5KmkE4aWFjdFUzU2o3SElYNGc0QlpLcXNWR0hMME0=
APP_JWT_TOKEN: Wm5KmkE4aWFjdFUzU2o3SElYNGc0QlpLcXNWR0hMME0=4QZVysw1MIFmwZi0KvEOaHs0leAix3U6zueUZJtQYjYj
TOKEN_PASSWORD: base64:Z1dVYk5TcEZWUVhMNHZCUllIc3JQTVg0ZEdWTTh5eDg=
TOKEN_AUDIENCE: http://localhost
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_URL: ${{ secrets.AWS_URL }}
SCOUT_DRIVER: database
MODEL_CACHE_STORE: model
MODEL_CACHE_ENABLED: false
LIGHTHOUSE_CACHE_ENABLE: true
LIGHTHOUSE_CACHE_VERSION: 2
#APP_DEBUG: true
#third party integration
TEST_ZOHO_CLIENT_ID: ${{ secrets.TEST_ZOHO_CLIENT_ID }}
TEST_ZOHO_CLIENT_SECRET: ${{ secrets.TEST_ZOHO_CLIENT_SECRET }}
TEST_ZOHO_CLIENT_REFRESH_TOKEN: ${{ secrets.TEST_ZOHO_CLIENT_REFRESH_TOKEN }}
TEST_SHOPIFY_API_KEY: ${{ secrets.TEST_SHOPIFY_API_KEY }}
TEST_SHOPIFY_API_SECRET: ${{ secrets.TEST_SHOPIFY_API_SECRET }}
TEST_SHOPIFY_SHOP_URL: ${{ secrets.TEST_SHOPIFY_SHOP_URL }}
TEST_APPLE_LOGIN_TOKEN: ${{ secrets.TEST_APPLE_LOGIN_TOKEN }}
TEST_APOLLO_KEY: ${{ secrets.TEST_APOLLO_KEY }}
TEST_STRIPE_SECRET_KEY: ${{ secrets.TEST_STRIPE_SECRET_KEY }}
TEST_AMPLITUDE_KEY: ${{ secrets.TEST_AMPLITUDE_KEY }}
TEST_AMPLITUDE_SECRET: ${{ secrets.TEST_AMPLITUDE_SECRET }}
NET_SUITE_CUSTOMER_ID: ${{ secrets.NET_SUITE_CUSTOMER_ID }}
NET_SUITE_INVOICE_NUMBER: ${{ secrets.NET_SUITE_INVOICE_NUMBER }}
NET_SUITE_ACCOUNT: ${{ secrets.NET_SUITE_ACCOUNT }}
NET_SUITE_CONSUMER_KEY: ${{ secrets.NET_SUITE_CONSUMER_KEY }}
NET_SUITE_CONSUMER_SECRET: ${{ secrets.NET_SUITE_CONSUMER_SECRET }}
NET_SUITE_TOKEN: ${{ secrets.NET_SUITE_TOKEN }}
NET_SUITE_TOKEN_SECRET: ${{ secrets.NET_SUITE_TOKEN_SECRET }}
TEST_APPLE_PAYMENT_SHARED_SECRET: ${{ secrets.TEST_APPLE_PAYMENT_SHARED_SECRET }}
TEST_OFFER_LOGIX_SOURCE_ID: ${{ secrets.TEST_OFFER_LOGIX_SOURCE_ID }}
strategy:
fail-fast: false
matrix:
php-versions: ["8.3"]
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: kanvas
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
rabbitmq:
image: rabbitmq
ports:
- 5672:5672
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
tools: pecl
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Setup Inventory DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS inventory;'
- name: Setup Social DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS social;'
- name: Setup CRM DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS crm;'
- name: Setup WORKFLOW DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS workflow;'
- name: Setup ACTION_ENGINE DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS action_engine;'
- name: Setup COMMERCE DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS commerce;'
- name: Setup EVENT DB
run: |
mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE IF NOT EXISTS event;'
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Setup Kanvas Ecosystem
run: php artisan kanvas:setup-ecosystem
- name: Execute type checking
run: vendor/bin/phpstan --configuration="phpstan.neon.dist" --xdebug