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
43 changes: 41 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,54 @@ on:
- development

jobs:
test:
runs-on: ubuntu-latest
environment: test

services:
mongodb:
image: mongo:8
ports:
- 27017:27017

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Run tests
env:
NODE_ENV: test
MONGODB_TEST_URI: mongodb://localhost:27017/test-ci
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}
API_KEY: ${{ secrets.API_KEY }}
ACCESS_TOKEN_EXPIRES: 1m
REFRESH_TOKEN_EXPIRES: 7d
GOOGLE_CLIENT_ID: dummy
GOOGLE_CLIENT_SECRET: dummy
SLACK_CLIENT_ID: dummy
SLACK_CLIENT_SECRET: dummy
run: npm test

deploy:
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4 # Updated version
uses: actions/checkout@v4

- name: Add SSH private key to agent
uses: webfactory/ssh-agent@v0.9.0 # Updated version
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ dist/
structure.md
CLAUDE.md

/docs/*
/docs/*

test-mcp-oauth.sh
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base
FROM node:lts-alpine AS base
FROM node:22-alpine AS base

WORKDIR /app
COPY package*.json ./
Expand All @@ -21,7 +21,7 @@ COPY . .
RUN npm run build

# Production
FROM node:lts-alpine AS production
FROM node:22-alpine AS production
ENV NODE_ENV='production'

RUN addgroup --system --gid 1001 nodejs
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"dev": "ts-node-dev --respawn --transpile-only -r tsconfig-paths/register src/index.ts",
"build": "cross-env NODE_ENV=production tsc && tsc-alias",
"start": "cross-env NODE_ENV=production node dist/src/index.js",
"test": "jest --detectOpenHandles",
"test:watch": "jest --watchAll --detectOpenHandles --forceExit",
"test:coverage": "jest --coverage"
"test": "cross-env NODE_ENV=test jest --detectOpenHandles",
"test:watch": "cross-env NODE_ENV=test jest --watchAll --detectOpenHandles --forceExit",
"test:coverage": "cross-env NODE_ENV=test jest --coverage"
},
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions src/config/dot-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ if (process.env.DOCKER !== "true" && process.env.NODE_ENV === "production") {
envConfig.path = "./.env.production";
}

if (process.env.DOCKER !== "true" && process.env.NODE_ENV === "test") {
envConfig.path = "./.env.test";
}

export default envConfig;
Loading