Skip to content

Commit

Permalink
✨ [Merge] 토너먼트 기능 포함된 dev 브랜치 merge (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimhan-nah authored Dec 22, 2023
2 parents dbbcfba + 673d8b4 commit a5aa967
Show file tree
Hide file tree
Showing 196 changed files with 11,037 additions and 1,583 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "🐛 Bug "
description: "Bug 발생 시 작성해주세요."
title: "🐛 [Bug] "
labels: ["bug"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: 무슨 문제가 발생했는지 설명해주세요.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: 버그 재현 방법을 설명해주세요.
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: Screenshot
description: 이해를 돕기 위해 스크린샷을 첨부해주세요.
- type: textarea
id: Expected-Behavior
attributes:
label: Expected Behavior
description: 버그가 없었을 때 어떤 결과가 나왔어야 하는지 설명해주세요.
- type: textarea
id: log
attributes:
label: Log
description: 에러 로그를 복사해서 첨부해주세요.
render: Shell
- type: dropdown
id: browser
attributes:
description: 버그가 발생한 브라우저를 선택해주세요.
label: Browser
multiple: true
options:
- Chrome
- Firefox
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "✨ Feature"
description: "Feature 작업 사항을 입력해주세요."
title: "✨ [Feature] "
labels: ["enhancement"]
body:
- type: textarea
id: description
attributes:
label: Description
description: 이슈에 대한 설명을 입력해주세요.
validations:
required: true
- type: textarea
id: todo
attributes:
label: Todo
description: Todo list 를 추가해주세요.
value: "- [ ] todo1"
- type: textarea
id: etc
attributes:
label: ETC
description: 기타 이슈사항을 입력해주세요.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/refactoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "🔨 Refactoring"
description: "Refactoring 작업 사항을 입력해주세요."
title: "🔨 [Refactoring] "
labels: ["refactoring", "enhancement"]
body:
- type: textarea
id: description
attributes:
label: Description
description: 이슈에 대한 설명을 입력해주세요.
validations:
required: true
- type: textarea
id: todo
attributes:
label: Todo
description: Todo list 를 추가해주세요.
value: "- [ ] todo1"
- type: textarea
id: etc
attributes:
label: ETC
description: 기타 이슈사항을 입력해주세요.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "🧪 Test"
description: "Test 작업 사항을 입력해주세요."
title: "🧪 [Test] "
labels: ["test"]
body:
- type: textarea
id: description
attributes:
label: Description
description: 이슈에 대한 설명을 입력해주세요.
validations:
required: true
- type: textarea
id: todo
attributes:
label: Todo
description: Todo list 를 추가해주세요.
value: "- [ ] todo1"
- type: textarea
id: etc
attributes:
label: ETC
description: 기타 이슈사항을 입력해주세요.
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
-
## ✅ 변경로직 <!-- 고친 사항을 적어주세요. 재PR 시에만 사용해 주세요! (재PR 아닌 경우 삭제) -->
-
## 💡Issue 번호 <!-- issue number을 link 시켜주세요 (ex. "- close #4242") -->
-
6 changes: 3 additions & 3 deletions .github/workflows/main-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ jobs:
key: ${{ secrets.MAIN_SERVER_PEM }}
script: |
cd ./docker
docker stop tomcat
docker rm tomcat
docker-compose down tomcat
docker rmi ${{ env.IMAGE_NAME }}:latest
docker-compose up -d
docker-compose up tomcat -d
docker-compose up prometheus -d
- name: Remove Github Actions IP From Security Group
run: |
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/test-code-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 💻 Test code validation

on:
pull_request:
branches: [ main, dev ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: ️👶 Unit Test with Gradle
run: ./gradlew --console verbose clean unitTestCoverage
- name: mv for separate report folder
run: mv ./build/reports/jacoco/test ./build/reports/jacoco/unitTest
- name: mv for separate report name
run: mv ./build/reports/jacoco/unitTest/jacocoTestReport.xml ./build/reports/jacoco/unitTest/unitTestReport.xml
- name: 📲 Upload unitTest coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/reports/jacoco/unitTest/unitTestReport.xml
flags: unitTest
name: codecov-unit
verbose: true
- name: 👨‍👨‍👧‍👦 Integration Test with Gradle
run: ./gradlew --console verbose clean integrationTestCoverage
- name: 📲 Upload integrationTest coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: integrationTest
name: codecov-integration
verbose: true
30 changes: 16 additions & 14 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
name: test-deploy

on:
push:
branches: [ dev ]
workflow_dispatch:

env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: wken5577/test-server
IMAGE_NAME: wken5577/test-migrate-server

permissions:
contents: read
Expand All @@ -36,7 +38,7 @@ jobs:
- name: Make application ymls
run: |
cd ./src/main/resources
echo "${{ secrets.APPLICATION_YML }}" | base64 -d > application.yml
echo "${{ secrets.MIGRATE_APPLICATION_YML }}" | base64 -d > application.yml
shell: bash

- name: Login to Docker Hub
Expand All @@ -46,7 +48,7 @@ jobs:
password: ${{ env.DOCKER_PASSWORD }}

- name: Build with Gradle
run: ./gradlew clean build
run: ./gradlew clean test build

- name: build new docker image as latest tag
run: |
Expand All @@ -60,27 +62,27 @@ jobs:
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_SECURITY_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECURITY_SECRET_KEY }}
aws-access-key-id: ${{ secrets.AWS_TEST_MIGRATE_SECURITY_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_MIGRATE_SECURITY_SECRET_KEY }}
aws-region: ap-northeast-2

- name: Add Github Actions IP to Security group
run: |
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_TEST_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_TEST_MIGRATE_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
- name: executing docker-compose up on test server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.TEST_SERVER_HOST }}
username: ${{ secrets.TEST_SERVER_USERNAME }}
key: ${{ secrets.TEST_SERVER_PEM }}
host: ${{ secrets.TEST_MIGRATE_SERVER_HOST }}
username: ${{ secrets.TEST_MIGRATE_SERVER_USERNAME }}
key: ${{ secrets.TEST_MIGRATE_SERVER_PEM }}
script: |
cd ./docker
docker stop tomcat
docker rm tomcat
cd /home/ec2-user/docker
docker-compose down tomcat
docker rmi ${{ env.IMAGE_NAME }}:latest
docker-compose up -d
docker-compose up tomcat -d
docker-compose up prometheus -d
- name: Remove Github Actions IP From Security Group
run: |
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.AWS_TEST_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.AWS_TEST_MIGRATE_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
86 changes: 0 additions & 86 deletions .github/workflows/test-migrate-deploy.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ out/
pingping.pem

### logs ###
./logs/*
./logs/*

### git commit message convention file ###
.gitmessage.txt
Loading

0 comments on commit a5aa967

Please sign in to comment.