-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.28 KB
/
dev.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
name: Execute Tests and Deploy
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: webapp3il_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: |
cd backend-nest
npm install
- name: Initialize Database
run: |
cd backend-nest
npx prisma migrate deploy
npx prisma migrate status
env:
DATABASE_URL: mysql://root:password@localhost:3306/webapp3il_test
- name: Deploy Database
run: |
cd backend-nest
npx prisma migrate deploy
env:
DATABASE_URL: mysql://root:password@localhost:3306/webapp3il_test
- name: Test Backend
run: |
cd backend-nest
npm test
env:
DATABASE_URL: mysql://root:password@localhost:3306/webapp3il_test