-
Notifications
You must be signed in to change notification settings - Fork 3
111 lines (100 loc) · 3.55 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
name: static analysis
on: [ "push" ]
jobs:
run-tests:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, redis, swoole
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: social
DB_CRM_USERNAME: root
DB_CRM_PASSWORD: password
KANVAS_APP_ID: 059ddaaf-89b5-4158-a85a-90cbd69aa34b
APP_KEY: base64:4QZVysw1MIFmwZi0KvEOaHs0leAix3U6zueUZJtQYjY=
APP_JWT_TOKEN: 4QZVysw1MIFmwZi0KvEOaHs0leAix3U6zueUZJtQYjY4QZVysw1MIFmwZi0KvEOaHs0leAix3U6zueUZJtQYjY
TOKEN_AUDIENCE: http://localhost
TOKEN_PASSWORD: base64:4QZVysw1MIFmwZi0KvEOaHs0leAix3U6zueUZJtQYjY=
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
strategy:
fail-fast: false
matrix:
php-versions: ["8.2" ]
services:
mysql:
image: mariadb:10.4
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@v3
- 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@v3
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: 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.src.neon.dist" --xdebug