Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
cea4d7a
Setting up GitHub Classroom Feedback
github-classroom[bot] Sep 7, 2024
45681df
Update README.md
Linchen-Xu Sep 7, 2024
57cc440
Update README.md
Linchen-Xu Sep 7, 2024
e4afc1f
Create team.md
Linchen-Xu Sep 12, 2024
f1be12c
Modify team.md
Stanford997 Sep 14, 2024
5cdf566
feat: update the team.md
adamma1024 Sep 14, 2024
71ed6da
ugit config --global user.email "andy1305226604@hotmail.com"
andyasdd1 Sep 14, 2024
4a9e431
update
Sep 19, 2024
284241c
update
Sep 19, 2024
e99d544
feat: PR and ISSUE templates
adamma1024 Sep 21, 2024
3b352f1
fix: add emojis
adamma1024 Sep 21, 2024
23ac3a1
feat: first version of fe
adamma1024 Sep 21, 2024
0fc4403
fix: change pages
adamma1024 Sep 21, 2024
9251331
feat: basic layout
adamma1024 Sep 21, 2024
8a3b1c2
Update bug_report.yml
adamma1024 Sep 22, 2024
88c9f7f
Update feature_request.yml
adamma1024 Sep 22, 2024
db2effc
feat: add textarea and upload files
adamma1024 Sep 23, 2024
5fa632d
feat: Enhance the README.md
adamma1024 Sep 25, 2024
3947ff5
update gitignore
Linchen-Xu Sep 26, 2024
a304e80
feat: update the README and add the BE design
Stanford997 Sep 26, 2024
78772b1
docs: update iteration 0 documents
Linchen-Xu Sep 27, 2024
69f484f
docs: update iteration 0 documents
Linchen-Xu Sep 27, 2024
7e2612d
feat(configuration): add a plugin to apply the Conventional commit
adamma1024 Sep 29, 2024
bcaf731
docs(configuration): update the development_manual
adamma1024 Sep 29, 2024
49ca6f4
docs(configuration): update the README
adamma1024 Sep 29, 2024
3ba8cc0
docs(configuration): update the README
adamma1024 Sep 29, 2024
5ace0ea
feat(configuration): integrate docker for fe_repo
adamma1024 Oct 1, 2024
77811ed
feat(configuration): integrate the docker-compose
adamma1024 Oct 1, 2024
1c60f7d
docs(configuration): update the README about docker
adamma1024 Oct 1, 2024
3517a73
docs: update gitignore, Dockerfile and docker-compose.yml
Linchen-Xu Oct 1, 2024
c47911b
feature: implement chat functionality
Linchen-Xu Oct 2, 2024
e8ced5a
feature: implement upload functionality
Linchen-Xu Oct 2, 2024
5c9a0a3
docs: add comments
Linchen-Xu Oct 2, 2024
3063805
refactor: remove unused code
Linchen-Xu Oct 2, 2024
dca6163
feat(configuration): integrate vitest and ci
adamma1024 Oct 3, 2024
b625d80
docs(configuration): update the CICD doc
adamma1024 Oct 3, 2024
c68eeb3
fix(configuration): fix build errors
adamma1024 Oct 3, 2024
133b3ea
refactor(configuration): rename the ci pipeline
adamma1024 Oct 3, 2024
e3ea242
feat: add module resume upload and parse
Stanford997 Sep 30, 2024
bbbff47
Training_zihan
andyasdd1 Oct 3, 2024
75ba183
feat: Preprocessing, use ChatGPT to evaluate the resume dataset
Stanford997 Oct 8, 2024
6f1fe19
feat: implement login functionality
Linchen-Xu Oct 3, 2024
5b95291
feat: implement login functionality
Linchen-Xu Oct 3, 2024
68b24f1
feat: implement login functionality
Linchen-Xu Oct 3, 2024
6eaf4bb
feat: implement Q&A state prompt
Linchen-Xu Oct 8, 2024
41a06c6
feat: put response in the correct position
Linchen-Xu Oct 8, 2024
2f497f3
feat: solve lint check
Linchen-Xu Oct 9, 2024
0ca4a87
feat: solve vite check
Linchen-Xu Oct 9, 2024
7c394cd
feat: solve build error
Linchen-Xu Oct 9, 2024
d4688f5
chore: solve the conflict
adamma1024 Oct 11, 2024
5e1b41a
feat: analyze resume
Linchen-Xu Oct 9, 2024
54eecc1
feat: add testing for analyze(), remove TODO
Linchen-Xu Oct 10, 2024
91df546
feat: transform styles into tailwind classNames
Linchen-Xu Oct 10, 2024
c0877d1
feat: transform styles into tailwind classNames
Linchen-Xu Oct 11, 2024
1e06a83
feat(configuration): add auto deploy
adamma1024 Oct 11, 2024
99cc8b4
docs(configuration): update badges
adamma1024 Oct 11, 2024
47e28bf
fix(configuration): update badges
adamma1024 Oct 11, 2024
5073059
fix(configuration): hide the license badge
adamma1024 Oct 11, 2024
d204ef0
fix: ignore the .vite folder
adamma1024 Oct 11, 2024
7566b1d
fix([cd]): add sudo before docker commands
adamma1024 Oct 12, 2024
4f6f2e4
feat: Backend, Database upload and Resume embedding.
andyasdd1 Oct 9, 2024
95d5e9e
feat(configuration): add config.json
Stanford997 Oct 9, 2024
5467367
feat: resume analysis
Stanford997 Oct 10, 2024
d5dbe5e
feat: evaluator - return result in json
Stanford997 Oct 10, 2024
ff95333
feat: add CORS for API calls, add requirements.txt for faster deployment
Linchen-Xu Oct 12, 2024
b7a8f90
feat: adjust code for backend api and better visualization
Linchen-Xu Oct 12, 2024
430be43
feat: adjust code for backend api and better visualization
Linchen-Xu Oct 12, 2024
14febaf
feat: adjust code for backend api and better visualization
Linchen-Xu Oct 12, 2024
b9f8093
feat: adjust code for backend api and better visualization
Linchen-Xu Oct 12, 2024
e3e42ca
docs(configuration): add CHANGELOG.md and workflow
adamma1024 Oct 14, 2024
9da26aa
feat: just a showcase
adamma1024 Oct 14, 2024
dd55d38
fix(cd): change the EC2 ip to a Github secret
adamma1024 Oct 14, 2024
a36f96c
doc: upload demo video and updated Readme file
andyasdd1 Oct 15, 2024
793eb89
feat: move backend code from /code to /be_repo
Stanford997 Oct 15, 2024
ff6b9ea
feat: unit test for upload
Stanford997 Oct 15, 2024
bac4e90
feat: job description keywords extraction
Stanford997 Oct 15, 2024
6fe5f69
app.py
Stanford997 Oct 15, 2024
fd57ee2
app.py
Stanford997 Oct 15, 2024
698c4e0
docs: readme
adamma1024 Oct 17, 2024
d67123c
doc: upload iteration 1 documents
Linchen-Xu Oct 17, 2024
95d47bd
doc: upload iteration 1 documents
Linchen-Xu Oct 17, 2024
a8d9d4b
[Feat](configuration): Integrate pytest and ci
Stanford997 Oct 17, 2024
6edc47d
feat: add path and working-directory
Stanford997 Oct 17, 2024
7196d29
feat: implement /ask api
Linchen-Xu Oct 22, 2024
89d01b2
feat: implement /login api
Linchen-Xu Oct 22, 2024
2d063e1
refactor: remove unused code
Linchen-Xu Oct 29, 2024
89d20e2
refactor: remove unused import statement
Linchen-Xu Oct 29, 2024
ea2a8fe
refactor: update test case in api.test.ts
Linchen-Xu Oct 29, 2024
a96a551
feat: save API_KEY in MongoDB
Stanford997 Oct 29, 2024
79bc522
feat(lab3): docker for be and test in docker
adamma1024 Oct 31, 2024
cec0258
feat: add XSS protection for lab3
adamma1024 Oct 31, 2024
c7e9476
feat: resume-evaluate-with-JD Step1
Stanford997 Oct 30, 2024
c56cebb
feat: resume-evaluate-with-JD Step2
Stanford997 Oct 31, 2024
9fbb5d6
feat: implement /login api
Linchen-Xu Nov 1, 2024
6a2918e
feat: implement /login api
Linchen-Xu Nov 2, 2024
2decdf2
feat: unit test - evaluator
Stanford997 Nov 2, 2024
95b973a
feat: add resume analysis with JD
Linchen-Xu Nov 2, 2024
d826fd5
docs(changelog): generate iteration3 changelog
adamma1024 Nov 7, 2024
ba01186
feat: integration test - resume evaluate
Stanford997 Nov 5, 2024
fe7dd8e
remove unnecessary file
Stanford997 Nov 5, 2024
f70a541
Update: app.py Add in login methods for backend
andyasdd1 Nov 6, 2024
96b785e
Update app.py Changes: fixed login issue, partial implemented session…
andyasdd1 Nov 6, 2024
7d67acb
feat: new logic for compute correlated score
Stanford997 Nov 6, 2024
fe10060
feat: e2e test
Stanford997 Nov 6, 2024
cfff953
update requirements.txt
Stanford997 Nov 6, 2024
865d7f8
update requirements.txt
Stanford997 Nov 6, 2024
7c7331e
test_e2e.py moved from tests to test_e2e
Stanford997 Nov 6, 2024
88856ae
modify ci_be.yml to ignore test_e2e when testing with pytest
Stanford997 Nov 6, 2024
f691ffd
bug fixed
Stanford997 Nov 7, 2024
027a07d
bug fixed
Stanford997 Nov 7, 2024
ba928e7
feat: CI for E2E
Stanford997 Nov 7, 2024
62d4c2a
bug fixed
Stanford997 Nov 7, 2024
356059b
[Fix]: null value in ChatBox.tsx and indents->2
Stanford997 Nov 7, 2024
ae942ca
bug fixed
Stanford997 Nov 7, 2024
78559de
feat: add unit test for parser
Stanford997 Nov 7, 2024
6ac713d
[Fix]: add path to test_resume.pdf
Stanford997 Nov 7, 2024
e613260
Update app.py Security, delete google_client_id code
andyasdd1 Nov 7, 2024
d70c98c
docs(changelog): update the changelog
adamma1024 Nov 7, 2024
edcbdc3
fix(cd): force remove container
adamma1024 Nov 7, 2024
097b84f
Merging!
Stanford997 Nov 7, 2024
596603b
feat: integration test - resume evaluate
Stanford997 Nov 5, 2024
522eaae
remove unnecessary file
Stanford997 Nov 5, 2024
8ecc3ff
Update: app.py Add in login methods for backend
andyasdd1 Nov 6, 2024
dbaea6d
feat: e2e test
Stanford997 Nov 6, 2024
bf441bf
test_e2e.py moved from tests to test_e2e
Stanford997 Nov 6, 2024
204572e
modify ci_be.yml to ignore test_e2e when testing with pytest
Stanford997 Nov 6, 2024
725ba10
[Fix]: null value in ChatBox.tsx and indents->2
Stanford997 Nov 7, 2024
793d256
Merge
Stanford997 Nov 7, 2024
f5be970
docs(readme): update the readme about how to start up our project
adamma1024 Nov 7, 2024
914298c
docs(readme): update the readme
adamma1024 Nov 7, 2024
d5b1a51
doc: upload iteration 2 documents
Linchen-Xu Nov 7, 2024
6086d5d
[Fix]: docker ignore e2e testing
Stanford997 Nov 8, 2024
56008cb
feat: langgraph-qa_graph
Stanford997 Nov 14, 2024
aed3a88
feat: User Story - Answer User Question
Stanford997 Nov 15, 2024
865a34c
remove files
Stanford997 Nov 15, 2024
c9a4969
Update requirements.txt
Stanford997 Nov 15, 2024
0d029e5
Update coverage on Readme
github-actions[bot] Nov 15, 2024
28e9dce
fix: e2e test, keyword count
Stanford997 Nov 15, 2024
f8fb46c
fix: e2e test, keyword count == 2
Stanford997 Nov 15, 2024
911d3c6
[Fix]: Add user_state_collection handling in unit test upload_parse_r…
Stanford997 Nov 18, 2024
902cf78
Update coverage on Readme
github-actions[bot] Nov 18, 2024
ed87f46
feat: configuration of CD
adamma1024 Nov 18, 2024
db2e555
feat: implement interview question suggestion
Linchen-Xu Nov 16, 2024
43ec418
feat: add suggestion test and onSuggest type declaration
Linchen-Xu Nov 18, 2024
a45dc01
feat: add suggestion test and onSuggest type declaration
Linchen-Xu Nov 18, 2024
280055b
chore(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /fe_repo
dependabot[bot] Nov 16, 2024
38561bf
chore(deps): bump @eslint/plugin-kit from 0.2.0 to 0.2.3 in /fe_repo
dependabot[bot] Nov 15, 2024
71f6507
feat(ad): integrate google ad sensor
adamma1024 Nov 18, 2024
de32e6f
feat: optimize interaction by adding prompt guiding user to upload re…
Linchen-Xu Nov 18, 2024
a5b9c31
feat: optimize interaction by adding prompt guiding user to upload re…
Linchen-Xu Nov 18, 2024
1a5c9eb
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
f61088f
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
971bee9
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
fcbe995
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
744dc42
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
dfae746
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
116bf7f
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
b29c101
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
f5e6edb
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
76a66d9
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
c1266b5
refact: modify test-e2e
Linchen-Xu Nov 18, 2024
04f8c26
feat: implement backend functionality for interview question suggestion
Linchen-Xu Nov 18, 2024
a51d50d
refact: modify ci_be
Linchen-Xu Nov 18, 2024
390fece
feat: implement job suggestion
Nov 21, 2024
cab5944
feat: implement job suggestion
Nov 21, 2024
eabaa4b
fix: change method name
Linchen-Xu Nov 21, 2024
e4ad0bd
chore: rebase
adamma1024 Nov 23, 2024
ff91c1e
chore: rebase
adamma1024 Nov 23, 2024
a24f9cb
feat: add google analytics
adamma1024 Nov 23, 2024
e0e5fe6
feat: update all user state to 0 when app.py starts
Stanford997 Nov 21, 2024
b9f9d03
Add New Modules: GraphCypherQAChain. Add New Preprocess modules: embe…
andyasdd1 Dec 1, 2024
7b6d492
feat: integrate job recommendation functionality into API response
Linchen-Xu Dec 1, 2024
8055749
doc: modify ci_be
Linchen-Xu Dec 1, 2024
bd21bd0
doc: modify ci_be
Linchen-Xu Dec 1, 2024
cac5e33
doc: modify ci_be
Linchen-Xu Dec 1, 2024
9294855
doc: modify ci_be
Linchen-Xu Dec 1, 2024
d3f5bcf
doc: modify ci_be
Linchen-Xu Dec 1, 2024
e45e0c1
doc: modify ci_be
Linchen-Xu Dec 1, 2024
30a827b
doc: modify ci_be
Linchen-Xu Dec 1, 2024
ec3699d
doc: modify ci_be
Linchen-Xu Dec 1, 2024
2750028
doc: modify ci_be
Linchen-Xu Dec 1, 2024
b33b1d3
fix:
Linchen-Xu Dec 1, 2024
c4a4a65
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
21a1bf1
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
f35f702
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
a8a8e55
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
ea68e84
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
b916301
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
47be793
fix: automatically retrieve URI
Linchen-Xu Dec 1, 2024
eafe836
fix: increase wait time
Linchen-Xu Dec 1, 2024
28eddf0
fix: increase wait time
Linchen-Xu Dec 1, 2024
9f5e5a0
fix: increase wait time
Linchen-Xu Dec 1, 2024
a847753
fix: increase wait time
Linchen-Xu Dec 1, 2024
37d6520
fix: increase wait time
Linchen-Xu Dec 1, 2024
906cf53
fix: increase wait time
Linchen-Xu Dec 1, 2024
952b4b4
fix: job recommend conflict
andyasdd1 Dec 1, 2024
d4f6b66
fix: job recommend conflict
andyasdd1 Dec 1, 2024
eb3ab57
fix: job recommend conflict
andyasdd1 Dec 1, 2024
54cae32
fix: job recommend conflict
andyasdd1 Dec 1, 2024
f0b23b2
fix: job recommend conflict
andyasdd1 Dec 1, 2024
5be4b22
feat: save keys in mongodb
Stanford997 Dec 8, 2024
c200f55
feat: save keys in mongodb
Stanford997 Dec 8, 2024
03e39e6
doc: update iteration 3 documents
Linchen-Xu Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "🐞 Bug Report"
description: "Report a bug to help us improve the project"
title: "[BUG] :"
labels: [bug]

body:
- type: markdown
attributes:
value: |
### 🐞 Thanks for taking the time to report a bug!
Please provide the following details to help us resolve the issue.
_(Fields marked with a `*` are required)_

- type: input
id: bug_title
attributes:
label: "⚠️ Bug Summary"
description: "Briefly describe the bug. *"
placeholder: "e.g. App crashes on launch"
validations:
required: true

- type: textarea
id: reproduction_steps
attributes:
label: "🧩 Steps to Reproduce"
description: "Steps to reproduce the behavior. *"
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error

- type: textarea
id: expected_behavior
attributes:
label: "✅ Expected behavior"
description: "Describe what you expected to happen. *"
placeholder: "e.g. The app should load the dashboard screen."

- type: textarea
id: actual_behavior
attributes:
label: "❌ Actual behavior"
description: "Describe what actually happens when the bug occurs. *"
placeholder: "e.g. The app crashes and closes immediately."

- type: textarea
id: screenshots
attributes:
label: "📸 Screenshots"
description: "If applicable, add screenshots to help explain the problem."
placeholder: "Optional"

- type: input
id: environment_info
attributes:
label: "💻 Environment Details"
description: "Please provide details about your environment (OS, Browser, Version, etc.). *"
placeholder: "e.g. Windows 10, Chrome 92"
validations:
required: true
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 🚀 Feature Request
description: Suggest a feature or enhancement for the project
title: "[FEATURE] "
labels: [enhancement]

body:
- type: markdown
attributes:
value: |
🚀 Thanks for submitting a feature request! Please answer the following questions to help us better understand your request.

- type: input
id: feature_name
attributes:
label: "🎯 Feature Name"
description: "Provide a brief name for the feature request."
placeholder: "e.g. Dark Mode Toggle"
validations:
required: true

- type: textarea
id: problem_statement
attributes:
label: "🛠️ Problem Statement"
description: "Describe the problem or challenge that this feature would solve."
placeholder: "What is the current situation or problem that this feature would address?"
validations:
required: true

- type: textarea
id: solution_description
attributes:
label: "💡 Describe the solution you'd like"
description: "Give a clear and concise description of what you want to happen."
placeholder: "e.g. Adding a dark mode toggle to the settings menu."
validations:
required: true
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Context

> Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Changes

> Please list your changes here. For example:
>- Add new tests

## Screenshot (if applicated)

## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
23 changes: 23 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CD Pipeline

on:
push:
branches:
- releases/*
pull_request:
branches:
- releases/*

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin

- name: Build, Tag, Push Docker image
run: bash docker_auto_push.sh
75 changes: 75 additions & 0 deletions .github/workflows/ci_be.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI for BE

on:
pull_request:
branches: [ "main" ]
paths:
- 'be_repo/**'

permissions:
contents: write
checks: write
pull-requests: write

jobs:
live-test:
name: Live Test
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./be_repo

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Build coverage file
run: |
pytest --ignore=tests/test_e2e.py --junitxml=pytest.xml \
--cov=app --cov=modules \
--cov-report=term-missing:skip-covered tests/ | tee pytest-coverage.txt

- name: Pytest coverage comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./be_repo/pytest-coverage.txt
junitxml-path: ./be_repo/pytest.xml

- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: Update Readme with Coverage Html
run: |
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.coverageHtml }}\n<!-- Pytest Coverage Comment:End -->' ../README.md

- name: Debug current branch
run: |
echo "head ref: ${{ github.head_ref }} "
echo "ref name: ${{ github.ref_name }} "

- name: Commit & Push changes to Readme
uses: ad-m/github-push-action@master
with:
branch: ${{ github.head_ref || github.ref_name }}
message: Update coverage on Readme
github_token: ${{ secrets.GITHUB_TOKEN }}
79 changes: 79 additions & 0 deletions .github/workflows/ci_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI for E2E

on:
pull_request:
branches:
- main

jobs:
e2e-test:
runs-on: ubuntu-latest

services:
frontend:
image: node:18
options: --network-alias frontend
env:
PORT: 3000
ports:
- 3000:3000

backend:
image: python:3.9
options: --network-alias backend
env:
PORT: 5000
ports:
- 5000:5000


steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Start FE
- name: Set up and start frontend
working-directory: ./fe_repo
run: |
npm install -g pnpm
pnpm i
pnpm lint
pnpm build
pnpm preview &

# Step 3: Start BE
- name: Set up and start backend
working-directory: ./be_repo
run: |
pip install -r requirements.txt
python app.py &

# Step 4: Wair for BE and FE Services
- name: Wait for services to be ready
run: |
until curl -s http://localhost:8081; do
echo "Waiting for frontend to be ready..."
sleep 5
done

until curl -s http://localhost:5000; do
echo "Waiting for backend to be ready..."
sleep 5
done

# Step 5: Start E2E Test
- name: Installing package list
run: apt list --installed
- name: Removing previous chrome instances on runner
run: sudo apt purge google-chrome-stable

- name: Installing all necessary packages
run: pip install chromedriver-autoinstaller selenium pyvirtualdisplay pytest
- name: Install xvfb
run: sudo apt-get install xvfb


- name: Run E2E tests
run: |
pytest ./be_repo/tests/test_e2e.py
53 changes: 53 additions & 0 deletions .github/workflows/ci_fe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI for FE

on:
pull_request:
branches:
- main
paths:
- fe_repo/*

jobs:
"build-test-linter":
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./fe_repo

services:
docker:
image: docker:20.10.16
options: --privileged

steps:
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"

# Step 3: Install dependencies
- name: Install dependencies
run: |
npm install -g pnpm
pnpm i

# Step 4: Linter
- name: Check the linter
run: |
pnpm lint

# Step 5: Run Vite tests
- name: Run Vite tests
run: |
pnpm coverage

# Step 6: Build the project with Vite
- name: Build the project
run: |
pnpm build
29 changes: 29 additions & 0 deletions .github/workflows/deploy_to_ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to EC2

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install SSH Key
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.EC2_SSH_KEY }}

# stop old service and start a new one
- name: Deploy to EC2
run: |
ssh -o StrictHostKeyChecking=no adamma2048@${{ secrets.EC2_IP }} << EOF
cd seprojects-cs673a2f24_team5
sudo bash docker_auto_start.sh stop
git switch main
git pull
sudo bash docker_auto_start.sh start
EOF
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.idea/
node_modules
package-lock.json
.DS_Store
.vite
/code/configs/config.json
__pycache__
Loading
Loading