Skip to content

Commit 5a1e707

Browse files
committed
CI ispravka
1 parent 38b5750 commit 5a1e707

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ jobs:
2727
name: Backend (Laravel) - tests
2828
runs-on: ubuntu-latest
2929

30+
services:
31+
mysql:
32+
image: mysql:8.0
33+
env:
34+
MYSQL_DATABASE: crmnekretnine_test
35+
MYSQL_USER: crm
36+
MYSQL_PASSWORD: crm
37+
MYSQL_ROOT_PASSWORD: root
38+
ports:
39+
- 3306:3306
40+
options: >-
41+
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
42+
--health-interval=10s
43+
--health-timeout=5s
44+
--health-retries=10
45+
3046
steps:
3147
- name: Checkout
3248
uses: actions/checkout@v4
@@ -35,7 +51,7 @@ jobs:
3551
uses: shivammathur/setup-php@v2
3652
with:
3753
php-version: "8.2"
38-
extensions: mbstring, dom, fileinfo, pdo_sqlite, sqlite3
54+
extensions: mbstring, dom, fileinfo, pdo_mysql
3955
coverage: none
4056

4157
- name: Cache Composer
@@ -59,45 +75,26 @@ jobs:
5975
php artisan key:generate
6076
php artisan config:clear
6177
62-
- name: Run migrations (sqlite in-memory)
78+
- name: Run migrations (mysql)
6379
working-directory: laravel
6480
env:
6581
APP_ENV: testing
66-
DB_CONNECTION: sqlite
67-
DB_DATABASE: ":memory:"
82+
DB_CONNECTION: mysql
83+
DB_HOST: 127.0.0.1
84+
DB_PORT: 3306
85+
DB_DATABASE: crmnekretnine_test
86+
DB_USERNAME: crm
87+
DB_PASSWORD: crm
6888
run: php artisan migrate --force
6989

7090
- name: Run PHPUnit tests
7191
working-directory: laravel
7292
env:
7393
APP_ENV: testing
74-
DB_CONNECTION: sqlite
75-
DB_DATABASE: ":memory:"
76-
run: php artisan test
77-
78-
79-
# =========================
80-
# FRONTEND – BUILD PROVERA
81-
# =========================
82-
frontend-build:
83-
name: Frontend - build check
84-
runs-on: ubuntu-latest
85-
86-
steps:
87-
- name: Checkout
88-
uses: actions/checkout@v4
89-
90-
- name: Setup Node
91-
uses: actions/setup-node@v4
92-
with:
93-
node-version: "20"
94-
cache: npm
95-
cache-dependency-path: reactfront/package-lock.json
96-
97-
- name: Install frontend deps
98-
working-directory: reactfront
99-
run: npm ci
100-
101-
- name: Build frontend
102-
working-directory: reactfront
103-
run: npm run build
94+
DB_CONNECTION: mysql
95+
DB_HOST: 127.0.0.1
96+
DB_PORT: 3306
97+
DB_DATABASE: crmnekretnine_test
98+
DB_USERNAME: crm
99+
DB_PASSWORD: crm
100+
run: php artisan test

0 commit comments

Comments
 (0)