Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bug Report
description: Report a bug or broken behavior
labels: [bug]
body:
- type: markdown
attributes:
value: |
Before submitting, search open issues to avoid duplicates.

- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug.
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Exact steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen.
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
placeholder: |
OS: macOS 14 / Windows 11 / Ubuntu 22.04
Browser: Chrome 124 / Firefox 125
Node.js: 20.x
Python: 3.12.x
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Screenshots, error logs, or any other relevant information.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Feature Request
description: Suggest a new feature or enhancement
labels: [feature]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What problem does this feature solve?
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the feature you want to see implemented.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Any alternative approaches you have considered.

- type: textarea
id: additional
attributes:
label: Additional Context
description: Mockups, references, or any other relevant context.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/good_first_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Good First Issue
description: A beginner-friendly task suitable for new contributors
labels: [good first issue]
body:
- type: markdown
attributes:
value: |
This issue is intended for contributors new to the project. It should be self-contained and completable without deep knowledge of the codebase.

- type: textarea
id: description
attributes:
label: Task Description
description: A clear description of what needs to be done.
validations:
required: true

- type: textarea
id: context
attributes:
label: Context and Background
description: Any background information or links to relevant code the contributor needs to get started.
validations:
required: true

- type: textarea
id: acceptance
attributes:
label: Acceptance Criteria
description: Define what done looks like for this task.
placeholder: |
- [ ] Criterion 1
- [ ] Criterion 2
validations:
required: true

- type: textarea
id: hints
attributes:
label: Hints
description: Relevant files, functions, or documentation to look at first.
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Summary
<!-- What does this PR do? -->

## Motivation
<!-- Why is this change needed? Link the related issue. Closes #<issue> -->

## Implementation Notes
<!-- How did you approach the problem? Any trade-offs or decisions worth noting? -->

## Screenshots (if applicable)
<!-- Before / after screenshots for UI changes -->

## Checklist
- [ ] `npm run lint` passes
- [ ] Backend tests pass (`python -m pytest backend/`)
- [ ] No `.env` files or credentials committed
- [ ] Branch is up to date with `main`
- [ ] PR description is complete
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

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

jobs:
frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
needs: frontend-lint
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
env:
VITE_API_URL: https://karansingh12-freshscan-api.hf.space
VITE_DEV_MODE: false

backend-lint-and-test:
name: Backend Lint and Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install dependencies
run: |
pip install fastapi uvicorn supabase Pillow numpy \
python-dotenv python-multipart httpx pytest

- name: Lint with Ruff
run: |
pip install ruff
ruff check . --config ruff.toml
Comment on lines +62 to +70

- name: Run tests
run: python -m pytest tests/test_ci.py -v
env:
DEV_BYPASS_AUTH: "false"
DEV_BYPASS_TOKEN: ci-test-token
SUPABASE_URL: ""
SUPABASE_KEY: ""
SUPABASE_SERVICE_KEY: ""
FRONTEND_URL: http://localhost:5173
API_BASE_URL: http://localhost:8000
Loading
Loading