Skip to content

Commit

Permalink
ci: add ci for api gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
ckng0221 committed Jan 4, 2024
1 parent 4abbb24 commit 9c20f1e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/apigateway-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ApiGateway-CI

on:
push:
branches: ['*']
paths:
- 'apps/apigateway/**'
- '.github/workflows/apigateway-ci.yml'

env:
SERVICE: apigateway

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint:apigateway
- run: npm run build:apigateway
- run: npm run test:apigateway
3 changes: 2 additions & 1 deletion apps/apigateway/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
},
"exclude": ["test/*"]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config jest-e2e.json",
"test:apigateway": "turbo test --filter=apigateway",
"dev:ui": "turbo dev --filter=ui",
"build:ui": "turbo build --filter=ui",
"lint:ui": "turbo lint --filter=ui"
"build:apigateway": "turbo build --filter=apigateway",
"lint:ui": "turbo lint --filter=ui",
"lint:apigateway": "turbo lint --filter=apigateway"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"start:prod": {
"dependsOn": ["build"]
},
"lint": {}
"lint": {},
"test": {}
},

"globalDependencies": ["tsconfig.json"]
Expand Down

0 comments on commit 9c20f1e

Please sign in to comment.