forked from SE701Team2/Updog
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.02 KB
/
run-backend-tests.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
name: run-backend-tests.yml
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend/
env:
CI: 'false' # Prevents the runner from treating warnings as errors
strategy:
matrix:
node-version: [16.x]
steps:
- uses: mirromutth/[email protected]
with:
mysql database: 'updog'
mysql user: 'updogDev'
mysql password: 'password'
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ./backend/package-lock.json
- run: npm ci
- run: npm install -g sequelize-cli
- run: sequelize db:migrate:undo:all --url "mysql://updogDev:password@localhost:3306/updog"
- run: sequelize db:migrate --url "mysql://updogDev:password@localhost:3306/updog"
- run: npm run build --if-present
- run: npm test