Skip to content

Commit

Permalink
🚀 feat(ci): test ci 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
ImNM committed Jul 12, 2022
1 parent 33921e2 commit f914f57
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PORT=8000
NODE_ENV=dev
JWT_SECRET=localtestJWTkey
SWAGGER_USER=gosrock
SWAGGER_PASSWORD=gosrock22th
REDIS_HOST=localhost
REDIS_PORT=6379
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=gosrock
POSTGRES_PASSWORD=gosrock22th
POSTGRES_DB=ticket
4 changes: 2 additions & 2 deletions .github/workflows/test-in-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

# docker-compose를 활용해 테스트를 위한 컨테이너 환경을 구성합니다.
- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d --build
run: docker-compose -f "docker-compose.test.yml" up -d --build

# Node 16 버전을 사용합니다.
- name: Install node
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
# 앞의 작업이 실패/성공과 관계 없이 컨테이너들을 종료합니다.
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
run: docker-compose -f "docker-compose.test.yml" down

# # 슬랙으로 결과를 발송합니다.
# - name: Slack Notifications
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ lerna-debug.log*
!.vscode/launch.json
!.vscode/extensions.json
.coverage*
.env*
.env*

!.env.local
14 changes: 14 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.7'
services:
redis:
image: 'redis:alpine'
ports:
- '6379:6379'
postgres:
image: postgres:latest
container_name: postgres
restart: always
ports:
- '5432:5432'
env_file:
- .env.local
2 changes: 1 addition & 1 deletion src/auth/auth.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('AuthService', () => {

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [AuthService],
providers: [AuthService]
}).compile();

service = module.get<AuthService>(AuthService);
Expand Down

0 comments on commit f914f57

Please sign in to comment.