-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Github Actions CI Pipeline and fix existing lint errors #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
68aa093
955e945
ed9ac4e
39fea54
79f58c6
d31325b
8e9954d
3542271
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main", "master" ] | ||
| pull_request: | ||
| branches: [ "main", "master" ] | ||
|
|
||
| jobs: | ||
| frontend-ci: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20.x' | ||
| cache: 'npm' | ||
| cache-dependency-path: frontend/package-lock.json | ||
| - name: Install dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci || npm install | ||
| - name: Run lint | ||
| working-directory: ./frontend | ||
| run: npx eslint src | ||
| - name: Run build | ||
| working-directory: ./frontend | ||
| run: npm run build | ||
| env: | ||
| CI: true | ||
|
|
||
| backend-ci: | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| redis: | ||
| image: redis:alpine | ||
| ports: | ||
| - 6379:6379 | ||
| options: >- | ||
| --health-cmd "redis-cli ping" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| qdrant: | ||
| image: qdrant/qdrant:latest | ||
| ports: | ||
| - 6333:6333 | ||
| - 6334:6334 | ||
| mongo: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: mongo and qdrant services have no health checks, so their containers can still be starting when the backend test step runs. Add health-check options (e.g. mongo Prompt for AI agents |
||
| image: mongo:latest | ||
| ports: | ||
| - 27017:27017 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20.x' | ||
| cache: 'npm' | ||
| cache-dependency-path: backend/package-lock.json | ||
| - name: Install dependencies | ||
| working-directory: ./backend | ||
| run: npm ci || npm install | ||
| - name: Test backend startup | ||
| working-directory: ./backend | ||
| run: | | ||
| cp .env.example .env | ||
| node index.js & | ||
| SERVER_PID=$! | ||
| sleep 10 | ||
| kill -0 $SERVER_PID | ||
| kill $SERVER_PID | ||
|
Comment on lines
+71
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The backend startup test only verifies that the node process is still alive ( Prompt for AI agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The
npm ci || npm installfallback masks dependency drift. When package-lock.json is out of sync with package.json,npm cifails and the fallback runsnpm install, which silently resolves whatever versions are current instead of the locked, reproducible set — the exact regression this CI is meant to catch. Usenpm cialone so lock-file inconsistencies fail the build loudly.Prompt for AI agents