-
Notifications
You must be signed in to change notification settings - Fork 3
160 lines (145 loc) · 5.89 KB
/
static-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
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