-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.35 KB
/
backend-ci.yaml
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: Run Backend CI
on:
push:
branches:
- develop
paths:
- "backend/**"
pull_request:
branches:
- develop
paths:
- "backend/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository in Virtual Machine
uses: actions/checkout@v4
- name: Install Dependencies
working-directory: backend
run: |
npm install
- name: Run Tests
working-directory: backend
run: |
npm test
security:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository in Virtual Machine
uses: actions/checkout@v4
- name: Build Backend Docker Image
working-directory: backend
run: |
docker build -t backend:latest .
- name: Build Chatbot Docker Image
working-directory: backend/src/chatbot
run: |
docker build -t chatbot:latest .
- name: Run Snyk to check Backend Docker image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: backend:latest
- name: Run Snyk to check Chatbot Docker image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: chatbot:latest