Skip to content

Commit f5d0567

Browse files
committed
few updates
1 parent d73f96a commit f5d0567

File tree

3 files changed

+168
-0
lines changed

3 files changed

+168
-0
lines changed

.github/workflows/ci.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
frontend-lint-and-build:
11+
name: Frontend - Lint & Build
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
cache-dependency-path: frontend/package-lock.json
24+
25+
- name: Install dependencies
26+
working-directory: frontend
27+
run: npm ci
28+
29+
- name: Run linter
30+
working-directory: frontend
31+
run: npm run lint
32+
33+
- name: Build frontend
34+
working-directory: frontend
35+
run: npm run build
36+
37+
- name: Check build artifacts
38+
working-directory: frontend
39+
run: |
40+
if [ ! -d "dist" ]; then
41+
echo "Build failed - dist directory not created"
42+
exit 1
43+
fi
44+
echo "✅ Build successful - dist directory created"
45+
46+
backend-validate:
47+
name: Backend - Validate SAM Template
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
54+
- name: Setup Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '20'
58+
59+
- name: Setup SAM CLI
60+
uses: aws-actions/setup-sam@v2
61+
with:
62+
use-installer: true
63+
64+
- name: Validate SAM template
65+
working-directory: backend
66+
run: sam validate --lint
67+
68+
- name: Install Lambda dependencies - processCall
69+
working-directory: backend/lambda/processCall
70+
run: npm ci
71+
72+
- name: Install Lambda dependencies - chatbotQuery
73+
working-directory: backend/lambda/chatbotQuery
74+
run: npm ci
75+
76+
- name: Install Lambda dependencies - getCalls
77+
working-directory: backend/lambda/getCalls
78+
run: npm ci
79+
80+
- name: Install Lambda dependencies - deleteCall
81+
working-directory: backend/lambda/deleteCall
82+
run: npm ci
83+
84+
- name: SAM Build
85+
working-directory: backend
86+
run: sam build
87+
88+
- name: Check SAM build artifacts
89+
working-directory: backend
90+
run: |
91+
if [ ! -d ".aws-sam/build" ]; then
92+
echo "SAM build failed"
93+
exit 1
94+
fi
95+
echo "✅ SAM build successful"
96+
97+
markdown-lint:
98+
name: Documentation - Lint Markdown
99+
runs-on: ubuntu-latest
100+
101+
steps:
102+
- name: Checkout code
103+
uses: actions/checkout@v4
104+
105+
- name: Lint markdown files
106+
uses: DavidAnson/markdownlint-cli2-action@v16
107+
with:
108+
globs: |
109+
README.md
110+
CONTRIBUTING.md
111+
SECURITY.md
112+
CLAUDE.md
113+
CODE_OF_CONDUCT.md
114+
config: .markdownlint.json
115+
continue-on-error: true # Don't fail the build on markdown lint errors
116+
117+
check-secrets:
118+
name: Security - Check for Secrets
119+
runs-on: ubuntu-latest
120+
121+
steps:
122+
- name: Checkout code
123+
uses: actions/checkout@v4
124+
125+
- name: Run secret scan
126+
uses: trufflesecurity/trufflehog@main
127+
with:
128+
path: ./
129+
base: ${{ github.event.repository.default_branch }}
130+
head: HEAD
131+
extra_args: --only-verified
132+
continue-on-error: true # Don't fail build, just warn

.markdownlint.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"default": true,
3+
"MD013": {
4+
"line_length": 200,
5+
"code_blocks": false,
6+
"tables": false
7+
},
8+
"MD033": false,
9+
"MD041": false,
10+
"MD024": {
11+
"siblings_only": true
12+
}
13+
}

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
> **Self-hosted AI-powered platform** for analyzing customer discovery calls to extract pain points, feature requests, and objections. Built with React, AWS Lambda, and OpenAI GPT-4.
44
5+
[![CI](https://github.com/thrishma/analyze-calls/actions/workflows/ci.yml/badge.svg)](https://github.com/thrishma/analyze-calls/actions/workflows/ci.yml)
56
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
67
[![GitHub issues](https://img.shields.io/github/issues/thrishma/analyze-calls)](https://github.com/thrishma/analyze-calls/issues)
78
[![GitHub stars](https://img.shields.io/github/stars/thrishma/analyze-calls)](https://github.com/thrishma/analyze-calls/stargazers)
@@ -641,6 +642,28 @@ Update frontend `.env` to point to `http://localhost:3001`
641642

642643
See [CLAUDE.md](./CLAUDE.md) for detailed testing instructions and development workflows.
643644

645+
### Continuous Integration
646+
647+
This project uses GitHub Actions for CI/CD. On every push and pull request to `main`:
648+
649+
**Frontend checks:**
650+
- Linting with ESLint
651+
- Build verification
652+
- Artifact validation
653+
654+
**Backend checks:**
655+
- SAM template validation
656+
- Lambda dependency installation
657+
- SAM build verification
658+
659+
**Documentation checks:**
660+
- Markdown linting (warnings only)
661+
662+
**Security checks:**
663+
- Secret scanning with TruffleHog
664+
665+
**Status:** Check the badge at the top of this README for current build status.
666+
644667
## Roadmap
645668

646669
Potential future enhancements:

0 commit comments

Comments
 (0)