Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b2ed5f7
refactor(article): extract reusable article sorting builder
kellytan05 Apr 15, 2026
f1b0db0
test(article): cover default fallback and custom sorting
kellytan05 Apr 15, 2026
c602d7d
Merge pull request #1 from IamLebin1/feature-sort-tags
IamLebin1 Apr 20, 2026
3cf6f50
build configuration
kellytan05 Apr 20, 2026
126add6
Update build script
kellytan05 Apr 20, 2026
b88579e
Merge branch 'master' of https://github.com/IamLebin1/SCC_Assignment2
kellytan05 Apr 20, 2026
65374ea
feat(core): implement global API request logger middleware
IamLebin1 Apr 20, 2026
e2fe22f
Merge pull request #2 from IamLebin1/feature-global-logger
IamLebin1 Apr 20, 2026
2bd8053
feat(models): add calculateReadingTime helper method
Vickykiu Apr 20, 2026
b2b8566
dependency for testing (accidentally added it)
kellytan05 Apr 20, 2026
3093ed1
Merge branch 'master' of https://github.com/IamLebin1/SCC_Assignment2
kellytan05 Apr 20, 2026
684a786
ci: setup GitHub Actions pipeline for automated build and test
IamLebin1 Apr 21, 2026
8d8b7a9
Merge pull request #3 from IamLebin1/feature-global-logger
IamLebin1 Apr 21, 2026
76700b2
ci: setup GitHub Actions pipeline for automated build and test
IamLebin1 Apr 21, 2026
74ebf01
Merge pull request #4 from IamLebin1/feature-global-logger
IamLebin1 Apr 21, 2026
ac1e786
Merge remote-tracking branch 'origin/master' into feature-reading-time
Vickykiu Apr 21, 2026
443a06c
fix: resolve merge conflict in article.model.ts by merging both changes
Vickykiu Apr 22, 2026
258c6d0
Merge branch 'master' into feature-reading-time
Vickykiu Apr 23, 2026
af4cb48
deploy
Vickykiu Apr 23, 2026
664396d
Update article.model.ts on master
Vickykiu Apr 23, 2026
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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Group 36 CI Pipeline

on:
push:
pull_request:

jobs:
build-test-validate:
runs-on: ubuntu-latest
env:
DATABASE_URL: postgresql://postgres://postgres@localhost:5432/conduit
JWT_SECRET: ci-secret
NODE_ENV: test
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm

- name: Install Dependencies
run: npm ci

- name: Generate Prisma Client
run: npx prisma generate

- name: Run test with coverage
run: npx nx test api --coverage

- name: Build Application
run: npx nx build api
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.16.0
16 changes: 16 additions & 0 deletions Dockerfile.compose
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:18-bullseye-slim

WORKDIR /app

COPY package*.json ./
RUN npm ci

COPY . .

RUN npx prisma generate --schema src/prisma/schema.prisma
RUN npx nx reset
RUN npx nx build api

EXPOSE 3000

CMD ["sh", "-c", "npx prisma migrate deploy --schema src/prisma/schema.prisma && node dist/api/main.js"]
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
services:
postgres:
image: postgres:15-alpine
container_name: group36-postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: conduit
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d conduit"]
interval: 5s
timeout: 5s
retries: 10

realworld-api:
image: node:18-alpine
container_name: group36-realworld-api
working_dir: /app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/conduit
JWT_SECRET: group36-dev-secret
NODE_ENV: production
PORT: 3000
volumes:
- .:/app
command: >
sh -c "npm ci &&
npx prisma generate --schema src/prisma/schema.prisma &&
npx prisma migrate deploy --schema src/prisma/schema.prisma &&
npx nx build api &&
node dist/api/main.js"

volumes:
postgres-data:
Loading