Skip to content

Commit a3a005a

Browse files
committed
Add client tests + unify ci/cd + update readme
1 parent f5620a8 commit a3a005a

File tree

14 files changed

+7878
-1287
lines changed

14 files changed

+7878
-1287
lines changed

.github/workflows/ci-cd.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ jobs:
3838
if: |
3939
startsWith(github.ref, 'refs/heads/feature/') && needs.detect-changes.outputs.genai == 'true'
4040
runs-on: ubuntu-latest
41+
services:
42+
qdrant:
43+
image: qdrant/qdrant
44+
ports:
45+
- 6333:6333
46+
env:
47+
OPENAI_API_KEY: ${{ secrets.API_OPENAI }}
4148
steps:
4249
- name: Checkout code
4350
uses: actions/checkout@v4
@@ -132,6 +139,14 @@ jobs:
132139
run: npm install --include=dev
133140
working-directory: client
134141

142+
- name: Run linter
143+
run: npm run lint
144+
working-directory: client
145+
146+
- name: Run tests
147+
run: npm run test -- --run
148+
working-directory: client
149+
135150
- name: Build with Node
136151
run: npm run build
137152
working-directory: client

.github/workflows/genai-tests.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,30 @@ The project includes Helm charts for Kubernetes deployment in the `recipai-chart
424424
## CI/CD Pipeline
425425

426426
The project includes a GitHub Actions workflow `ci-cd.yml` for:
427-
428-
- **Testing Server**: For each push, server tests on server microservices are run.
429427
- **Building Docker Images**: Automatically builds and pushes Docker images to GitHub Container Registry.
430428
- **Deploying Docker Images**: Automatically deploys the application to a production environment by using deployment manifests in helm for K8s cluster.
429+
- **Running Server Tests**: For each push, server tests on server microservices are run.
430+
- **Running GenAI Tests**: Automatically runs the tests defined in the `genai/tests` directory on every code push in genai module.
431+
- **Running Client Tests**: Automatically runs the UI tests defined in the `client/src/components/__tests__` directory on every code push in client module.
432+
433+
### CI/CD Pipeline Workflow (`ci-cd.yml`)
434+
435+
**Triggers:**
436+
- Push to `main` or `feature/**` branches
437+
- Changes in `genai/**`, `server/**`, `client/**`, or workflow files
438+
439+
**Features:**
440+
- **Change Detection**: Uses `dorny/paths-filter` to detect which services have changed
441+
- **Conditional Builds**: Only builds and tests services that have been modified
442+
- **Multi-stage Pipeline**: Build → Test → Docker → Deploy
443+
444+
**Jobs:**
445+
- `detect-changes`: Identifies which services need building/testing
446+
- `build-genai`: Python linting and dependency installation
447+
- `build-server`: Java microservices build and test (API Gateway, Chat, User)
448+
- `build-client`: Node.js build and test
449+
- `docker-release-*`: Builds and pushes Docker images to GitHub Container Registry
450+
- `helm-deploy`: Deploys to Kubernetes using Helm charts
431451

432452
The project includes a GitHub Actions workflow `helm-manual.yml` for:
433453

@@ -437,10 +457,6 @@ The project includes a GitHub Actions workflow `ansible-manual.yml` for:
437457

438458
- **Running Ansible Playbook**: Manually runs any Ansible playbook defined in the `ansible/playbooks` directory against an EC2 instance securely using SSH and Ansible Vault.
439459

440-
The project includes a GitHub Actions workflow `genai-tests.yml` for:
441-
442-
- **Running GenAI Tests**: Automatically runs the tests defined in the `genai/tests` directory on every code push in genai module.
443-
444460
## API Documentation
445461

446462
### User Service

0 commit comments

Comments
 (0)