Skip to content

Merge pull request #122 from FYP-2024-IQMA/chat-evaluation #177

Merge pull request #122 from FYP-2024-IQMA/chat-evaluation

Merge pull request #122 from FYP-2024-IQMA/chat-evaluation #177

Workflow file for this run

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