Skip to content

stylo

stylo #6121

Workflow file for this run

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