Skip to content
Open

fixes #235

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
31a38d8
updates
sjhallo07 Oct 11, 2025
5f82fec
Implement user registration, login, logout, and frontend integration.…
sjhallo07 Oct 11, 2025
6101eb6
Frontend and backend registration, login, logout, manifest and routin…
sjhallo07 Oct 11, 2025
7b49452
Add CarMake and CarModel models, register in admin, implement get_car…
sjhallo07 Oct 12, 2025
794b5b5
Update populate.py to add CarMake and CarModel sample data
sjhallo07 Oct 12, 2025
fcebb7a
Update car make descriptions in populate.py and settings.py
sjhallo07 Oct 13, 2025
c21324a
Update car make descriptions in populate.py
sjhallo07 Oct 13, 2025
95d2f71
Your descriptive commit message here
sjhallo07 Oct 13, 2025
e8eafec
Update: frontend routes, Django URLs, bug fixes, and .env backend URL
sjhallo07 Oct 14, 2025
dbb39d3
Update README: author Marcos Mora
sjhallo07 Oct 14, 2025
d654fc4
puntos finales de API usando Express-Mongo
sjhallo07 Oct 16, 2025
769f0f3
Update frontend dependencies for build and scripts
sjhallo07 Oct 16, 2025
2fc032d
feat: PostReview make/model selects; seed and populate fixes; express…
sjhallo07 Oct 18, 2025
274e6f4
Add GitHub Actions workflow for linting Python and JS
sjhallo07 Oct 18, 2025
1534deb
Add GitHub Actions workflow for linting Python and JS
sjhallo07 Oct 18, 2025
41b8664
Initial plan
Copilot Oct 18, 2025
a42f439
Add .jshintrc config and update workflow to exclude node_modules
Copilot Oct 18, 2025
b4f361e
Initial plan
Copilot Oct 18, 2025
5de6a42
Fix flake8 linting errors in server/djangoproj/urls.py
Copilot Oct 18, 2025
16dce1c
update dockerfile and yml
sjhallo07 Oct 18, 2025
6b56120
Add Dockerfile, deployment.yaml and entrypoint script
sjhallo07 Oct 18, 2025
b2a97f8
Initial plan
Copilot Oct 19, 2025
128af98
Fix GitHub Actions workflow: update action versions, add caching, fix…
Copilot Oct 19, 2025
069f1bc
Update PostReview.jsx with new content
sjhallo07 Oct 19, 2025
37c93a4
Merge pull request #2 from sjhallo07/copilot/fix-linting-errors-urls-…
sjhallo07 Oct 19, 2025
1c92cff
Merge pull request #1 from sjhallo07/copilot/add-jshint-config-and-up…
sjhallo07 Oct 19, 2025
f17d539
Merge branch 'main' into copilot/fix-github-actions-workflow
sjhallo07 Oct 19, 2025
323defd
Update .github/workflows/main.yml
sjhallo07 Oct 19, 2025
c5b1046
Update .github/workflows/main.yml
sjhallo07 Oct 19, 2025
485d8c5
Update .github/workflows/main.yml
sjhallo07 Oct 19, 2025
2fdc6a3
Update .github/workflows/main.yml
sjhallo07 Oct 19, 2025
2431d7d
Merge pull request #3 from sjhallo07/copilot/fix-github-actions-workflow
sjhallo07 Oct 19, 2025
17a1bde
Add Docker Image CI workflow
sjhallo07 Oct 21, 2025
963a01c
Fix lint errors in Dealers.jsx
sjhallo07 Oct 21, 2025
7c0c198
chore(ci): add CI workflow and update .gitignore
sjhallo07 Oct 22, 2025
60da84d
ci: upload compose-success-logs artifact on success
sjhallo07 Oct 22, 2025
ed337f2
chore(docker): add frontend Dockerfile
sjhallo07 Oct 22, 2025
a934ef9
ci: build frontend docker image in CI so compose can use it
sjhallo07 Oct 22, 2025
4f066a2
fix(frontend): include dealer_url in useCallback deps for get_dealers
sjhallo07 Oct 23, 2025
156e3fb
ci: add CI pipeline workflow (lint, build, test)
sjhallo07 Oct 23, 2025
a3fa773
ci: use server/docker-compose.yml when bringing up services in integr…
sjhallo07 Oct 23, 2025
8c2e19f
ci: use docker-compose CLI to bring up server/docker-compose.yml in i…
sjhallo07 Oct 23, 2025
7ff4871
ci: use server/database/docker-compose.yml in integration workflow
sjhallo07 Oct 23, 2025
b9b49b7
ci: use docker compose plugin with build flag and bash shell in integ…
sjhallo07 Oct 23, 2025
a618fa5
ci: use placeholder compose path for integration startup
sjhallo07 Oct 23, 2025
2848ecd
ci: run default 'docker compose up --build -d' in integration workflow
sjhallo07 Oct 23, 2025
fd7b1ab
chore(docker): update database docker-compose and deployment image
sjhallo07 Oct 23, 2025
07aba6c
chore(ci): remove version from compose, add Docker daemon check step
sjhallo07 Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
138 changes: 138 additions & 0 deletions .github/workflows/ci-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# CI integration workflow: builds services with docker compose and checks basic health endpoints.
# Runs on push and pull_request for main and feature branches.
on:
push:
branches:
- main
- master
- "feature/**"
- "feat/**"
pull_request:
branches:
- main
- master

jobs:
integration:
name: Integration tests (docker-compose)
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build frontend Docker image
run: |
docker buildx build --load -f server/frontend/Dockerfile -t xrwvm-frontend:ci server/frontend

- name: Ensure docker-compose is available
run: |
docker version
docker compose version

- name: Check Docker daemon
shell: /usr/bin/bash -e {0}
run: |
if ! docker info >/dev/null 2>&1; then
echo "ERROR: Docker daemon is not reachable. Ensure Docker Desktop is running on the runner/host and that the Docker daemon is available." >&2
docker version || true
exit 1
fi

- name: Start docker-compose services
shell: /usr/bin/bash -e {0}
run: |
docker compose up --build -d
env:
COMPOSE_DOCKER_CLI_BUILD: 1

- name: Wait for sentiment endpoint (http://localhost:8080/analyze/hello%20world)
run: |
set -e
url="http://localhost:8080/analyze/hello%20world"
echo "Waiting for $url"
n=0
max=30
until curl --silent --fail --show-error -o /tmp/sentiment_resp.txt "$url"; do
n=$((n+1))
echo "Sentiment not ready, retry $n/$max..."
if [ $n -ge $max ]; then
echo "Sentiment endpoint failed to respond after $max attempts"
exit 1
fi
sleep 5
done
echo "Sentiment OK:"
cat /tmp/sentiment_resp.txt

- name: Wait for Django proxy endpoint (http://localhost:8000/api/dealers/)
run: |
set -e
url="http://localhost:8000/api/dealers/"
echo "Waiting for $url"
n=0
max=30
until curl --silent --fail --show-error -o /tmp/django_resp.txt "$url"; do
n=$((n+1))
echo "Django proxy not ready, retry $n/$max..."
if [ $n -ge $max ]; then
echo "Django proxy failed to respond after $max attempts"
exit 1
fi
sleep 5
done
echo "Django proxy OK:"
head -n 200 /tmp/django_resp.txt || true

- name: Run Django tests inside container (if available)
run: |
set -e
echo "Attempting to run Django tests inside django container"
docker compose exec -T django sh -c "if [ -f manage.py ]; then python manage.py test --verbosity=2 || true; else echo 'No manage.py found in container'; fi"

- name: Run Node (Express) tests inside container (if available)
run: |
set -e
echo "Attempting to run Node tests inside express-service container"
docker compose exec -T express-service sh -c "if [ -f package.json ] && grep -q '\"test\"' package.json; then npm test || true; else echo 'No tests defined or package.json missing'; fi"

- name: Run lightweight smoke checks
run: |
echo "Smoke checks passed; services reachable."

- name: Tear down docker compose (success)
if: success()
run: |
docker compose logs --no-color > compose-success-logs.txt || true
docker compose down -v || true

- name: Upload compose success logs (on success)
if: success()
uses: actions/upload-artifact@v4
with:
name: compose-success-logs
path: compose-success-logs.txt

- name: Collect docker-compose logs (always)
if: always()
run: |
set +e
docker compose logs --no-color > compose-logs.txt || true
echo "Logs collected to compose-logs.txt"

- name: Upload compose logs (always)
if: always()
uses: actions/upload-artifact@v4
with:
name: compose-logs
path: compose-logs.txt

- name: Upload compose logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: compose-failure-logs
path: compose-logs.txt
142 changes: 142 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: CI Pipeline

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

env:
CI: true
NODE_VERSION: '20'
PYTHON_VERSION: '3.12'

jobs:
lint_python:
name: Lint Python Files
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
cache-dependency-path: server/requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8

- name: Print working directory
run: pwd

- name: Run Linter
run: |
pwd
# Find all Python files recursively and run flake8 on them
find . -name "*.py" -exec flake8 {} +
echo "Linted all the python files successfully"

lint_js:
name: Lint JavaScript Files
runs-on: ubuntu-latest

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

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install JSHint
run: npm install jshint --global

- name: Run Linter
run: |
# Find all JavaScript files and run JSHint on them
find ./server/database -name "*.js" -exec jshint {} +
echo "Linted all the js files successfully"

build_frontend:
name: Build and Test Frontend
runs-on: ubuntu-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: server/frontend/package-lock.json

- name: Install dependencies
working-directory: ./server/frontend
run: npm ci

- name: Run tests
working-directory: ./server/frontend
run: npm test -- --watchAll=false --passWithNoTests
continue-on-error: true

- name: Build application
working-directory: ./server/frontend
run: npm run build

build_database:
name: Build and Test Database Service
runs-on: ubuntu-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: server/database/package-lock.json

- name: Install dependencies
working-directory: ./server/database
run: npm ci

- name: Run tests (if available)
working-directory: ./server/database
run: npm test || echo "No tests specified yet"

test_python:
name: Test Python Django App
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
cache-dependency-path: server/requirements.txt

- name: Install dependencies
working-directory: ./server
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run Django tests
working-directory: ./server
run: python manage.py test
continue-on-error: true
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
Loading