-
Notifications
You must be signed in to change notification settings - Fork 7
79 lines (62 loc) · 1.96 KB
/
smoke-test.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
name: Szentiras Smoke Test
on:
push:
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check Out Repository
uses: actions/checkout@v3
- name: Set Up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: xml,zip,gd,mbstring,curl,pgsql,gmp
ini-values: |
memory_limit = 512M
tools: composer
- name: Install Dependencies
run: php composer.phar install
- name: Install PostgreSQL Client
run: sudo apt-get install -y postgresql-client
- name: Create Databases
env:
PGPASSWORD: postgres
run: |
psql -h 127.0.0.1 -U postgres -c "CREATE USER homestead WITH PASSWORD 'secret';"
psql -h 127.0.0.1 -U postgres -c "CREATE DATABASE bible_testing OWNER homestead;"
psql -h 127.0.0.1 -U postgres -d bible_testing -c "CREATE EXTENSION IF NOT EXISTS vector;"
- name: Set Environment Variables
run: |
echo "DB_HOST=127.0.0.1" >> .env.testing
- name: Run Migrations
run: php artisan migrate --env=testing
- name: Seed Database
run: php artisan db:seed --env=testing
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '22.x'
- name: Install NPM Dependencies
run: npm install
- name: Install Vite
run: npm install vite
- name: Build Application
run: npm run build
- name: Run Tests
run: php artisan test