-
Notifications
You must be signed in to change notification settings - Fork 25
45 lines (36 loc) · 1.24 KB
/
backend-pull.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
name: Backend-Pull
on:
pull_request:
branches: [ develop,main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "⚡ Checkout"
uses: actions/checkout@v3
- name: "🧪 Setup node"
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: create env file
run: |
touch .env
echo MONGO_DB_CONNECTION_STRING=${{ secrets.MONGO_DB_CONNECTION_STRING }} >> .env
echo JWT_SECRET=${{ secrets.JWT_SECRET }} >> .env
echo EMAIL=${{ secrets.EMAIL }} >> .env
echo EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }} >> .env
echo AI_API_CONNECTION=${{ secrets.AI_API_CONNECTION }} >> .env
echo AI_API_CONNECTION=${{ secrets.AI_API_CONNECTION }} >> .env
- name: "📦 Install Dependencies"
working-directory: ./backend
run: yarn install --frozen-lockfile
- name: "🌹 Format Code"
working-directory: ./backend
run: yarn format
- name: "🧶 Lint Code"
working-directory: ./backend
run: yarn lint
- name: "🏁 Run unit tests backend"
working-directory: ./backend
run: yarn run test