Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿš€ Feature Github Action์„ ์ด์šฉํ•ด PullRequest ์‹œ ์ž๋™ build ๋ฐ test๋ฅผ ์ง„ํ–‰ํ•˜๋Š” CI pipeline ๊ตฌ์ถ• #21

Closed
wants to merge 42 commits into from

Conversation

shoeone96
Copy link
Collaborator

โœ… ์š”๊ตฌ์‚ฌํ•ญ

  • github action CI/CD ๊ตฌํ˜„

๐Ÿš€ ์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ

  • MySQL๊ณผ spring server build ๋ฅผ ๋„์›Œ ๊ฒ€์ฆ ์ง„ํ–‰
  • ์ง์ ‘ action ์•ˆ์—์„œ schema๋ฅผ MySQL์— ๋„ฃ๋Š” ๋ฐฉ์‹์œผ๋กœ ์ง„ํ–‰(spring์— ๋ถˆํ•„์š”ํ•œ ์˜์กด์„ฑ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์Œ)
  • build ๋ฐ ํ…Œ์ŠคํŠธ ์ข…๋ฃŒ๋˜๋Š” ๊ฒƒ ํ™•์ธ
  • pull Request๋ฅผ main branch๋กœ ํ•  ๋•Œ๋งˆ action์ด ์ง„ํ–‰๋จ

๐Ÿ’ก ๊ธฐํƒ€์‚ฌํ•ญ

  • โœ… CI ์ ์šฉํ•˜๊ธฐย #12 ๋ฒˆ์— ํ•ด๋‹นํ•˜๋Š” ๋‚ด์šฉ์ž„
  • ์ถ”ํ›„ ๋กœ๊ฑธ ํ™˜๊ฒฝ์—์„œ ๋Œ๋ ธ๋˜ docker compose๋ฅผ github action ์•ˆ์—์„œ ๋„์šฐ๋Š” ๋ฐฉ์‹์œผ๋กœ ๋ณ€๊ฒฝ ๊ณ ๋ ค
  • lint์™€ jacoco์˜ ๊ธฐ์ค€์— ๋ชป๋ฏธ์ณค์„ ์‹œ action ๊ณผ์ •์ด ์‹คํŒจํ•˜๋Š”์ง€ ํ™•์ธ ํ•„์š”

schema directory ์ˆ˜์ •
mysql ์—ฐ๊ฒฐ ์‹œ localhost ์ถ”๊ฐ€
mysql ์ƒ์„ฑ ์‹œ๊ฐ„ ๋ถ€์—ฌ ํ›„ init ์ž‘์—… ํ•  ์ˆ˜ ์žˆ๊ฒŒ step ์œ„์น˜ ๋ณ€๊ฒฝ
pull reque ์‹œ ์ž‘๋™ํ•˜๋Š” branch ๋ณ€๊ฒฝ
sql ์ ‘์†๊ณผ์ •์—์„œ ์–ด๋””๊ฐ€ ์ •ํ™•ํžˆ ๋ฌธ์ œ์ธ์ง€ ์•Œ๊ธฐ ์œ„ํ•ด ์‹คํ–‰ ์Šคํฌ๋ฆฝํŠธ ๋ถ„๋ฆฌ
ddl create ๋กœ build์™€ test ๋˜๋Š”์ง€ ์ ๊ฒ€
file ์ˆ˜์ • ํ›„ ์žฌ์‹œ๋„
ํฌํŠธ ๋ฒˆํ˜ธ ์ถ”๊ฐ€
์ธ์ฆ ๋ฌธ์ œ์ธ์ง€ ์žฌํ™•์ธ
์ปจํ…Œ์ด๋„ˆ ์ƒํƒœ ํ™•์ธ
docker ์ ‘์† ๋กœ์ง ์ถ”๊ฐ€
docker ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š์€ ์ˆœ์ˆ˜ sql ๋กœ ๊ตฌ๋™
์ ‘์† host ์ถ”๊ฐ€
ํฌํŠธ ๋ฒˆํ˜ธ ์ถ”๊ฐ€
ํฌํŠธ ๋ฐ host ์‚ญ์ œ
mysql ๊ณ„์ • ์ˆ˜์ •
mysql ์ ‘์† ๋ช…๋ น์–ด ์ˆ˜์ •
mysql ์ปจํ…Œ์ด๋„ˆ ๋Œ€๊ธฐ ์‹œ๊ฐ„ ๊ณ ๋ ค step ์ˆœ์„œ ๋ณ€๊ฒฝ
@shoeone96 shoeone96 added the enhancement New feature or request label Dec 21, 2023
@shoeone96 shoeone96 self-assigned this Dec 21, 2023
@Sehee-Lee-01 Sehee-Lee-01 linked an issue Dec 21, 2023 that may be closed by this pull request
3 tasks
@shoeone96 shoeone96 changed the title Feature ci ๐Ÿš€ Feature Github Action์„ ์ด์šฉํ•ด PullRequest ์‹œ ์ž๋™ build ๋ฐ test๋ฅผ ์ง„ํ–‰ํ•˜๋Š” CI pipeline ๊ตฌ์ถ• Dec 21, 2023
@Sehee-Lee-01
Copy link
Member

ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค! ๋„ˆ๋ฌด...๋„ˆ๋ฌด... ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค...๐Ÿš€๐Ÿฅฒ

Copy link
Collaborator

@ASak1104 ASak1104 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํŒŒ์ผ ๋ช…์— sync ๋ฅผ ์ถ”๊ฐ€ํ•œ ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?

Copy link
Collaborator

@ASak1104 ASak1104 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ •๋ง ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค ๐Ÿฅบ
์˜ค๋ฅ˜ ๋ถ€๋ถ„๋งŒ ์ˆ˜์ •ํ•˜๊ณ  ๋„ค์ด๋ฐ๋งŒ ์ž ๊น ๋…ผ์˜ํ•˜๋ฉด mergeํ•ด๋„ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!

Comment on lines +43 to +44
- name: Into Schema
run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ•ด๋‹น job์—์„œ ์‹คํŒจํ•˜๋„ค์š” ์•„๋งˆ๋„ ์•„๋ž˜์™€ ๊ฐ™์ด ๋ฐ”๊ฟ”์ค˜์•ผ ํ•  ๊ฒƒ ๊ฐ™์•„์š”! stackoverflow

Suggested change
- name: Into Schema
run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql
- name: Into Schema
run: mysql -h 127.0.0.1 -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์š” ๋ถ€๋ถ„์€ ์ด๋”ฐ๊ฐ€ ํšŒ์˜ ์‹œ๊ฐ„์— ์ด์•ผ๊ธฐ ๋‚˜๋ˆ ๋ณด๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™๊ตฐ์š”!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค ์ด๊ฑด ์ œ ๊ฐœ์ธ repo์—์„œ๋Š” ์„ฑ๊ณตํ–ˆ์—ˆ๋Š”๋ฐ ๋‹ค์‹œ ๋ด์•ผ๊ฒ ๋„ค์š”

@@ -40,10 +39,10 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# run ๋ช…๋ น์–ด๋กœ schema ๋งŒ๋“œ๋Š” ๋ช…๋ น์–ด ์‹คํ–‰
- name: Into Schema
Copy link
Collaborator

@ASak1104 ASak1104 Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Into Schema ๋ผ๋Š” ์ด๋ฆ„์ด ์ถ”์ƒ์ ์ธ ๋Š๋‚Œ์ด ๋“ค๊ธฐ๋„ ํ•˜๋„ค์š” Execute DDL script๋Š” ์–ด๋–จ๊นŒ์š”?
Create schema ๋„ ๊ดœ์ฐฎ๊ฒ ๋„ค์š”!

Suggested change
- name: Into Schema
- name: Execute DDL script

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create schema ์ข‹์€ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!

@shoeone96
Copy link
Collaborator Author

ํ˜„์žฌ secret ์ ์šฉ ๋ฌธ์ œ๋กœ ์ผ์‹œ์ ์œผ๋กœ close ํ•ฉ๋‹ˆ๋‹ค.

@shoeone96 shoeone96 closed this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

โœ… CI ์ ์šฉํ•˜๊ธฐ
3 participants