-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.01 KB
/
build.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
name: Build and deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
working-directory: ./server
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Cache server dependencies
working-directory: ./server
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/server/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
working-directory: ./server
run: npm install
- name: Generate Prisma Client
working-directory: ./server
run: npx prisma generate
- name: Run tests
working-directory: ./server
run: npm test
- name: Build
working-directory: ./server
run: npm run build