-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] 프론트 lint 오류 및 백엔드 테스트 오류 수정 #88
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
64d362f
refactor: 프론트 lint 오류 수정
moonwhistle 8661ee7
refactor: 백엔드 테스트 오류 수정
moonwhistle f327867
refactor: 웹소켓 재연결 안정화
moonwhistle 9efc14a
refactor: 브라우저 호환성 데이터 갱신
moonwhistle d0fbc78
refactor: 문서 정합성 작업 진행
moonwhistle aec9dd7
refactor: CI와 CD 워크플로우 분리
moonwhistle 7294b7b
refactor: 배포 워크플로우 보안 및 커밋 정합성 보강
moonwhistle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Backend CD | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: [ "CI" ] | ||
| branches: [ "master" ] | ||
| types: [ "completed" ] | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| name: Build Images And Deploy | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.workflow_run.head_sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'corretto' | ||
| cache: gradle | ||
|
|
||
| - name: Build backend JARs | ||
| run: | | ||
| cd backend | ||
| chmod +x ./gradlew | ||
| ./gradlew build | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Build and push Docker images | ||
| env: | ||
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| run: | | ||
| cd infra/docker | ||
| docker compose -f docker-compose-prod.yml build | ||
| docker compose -f docker-compose-prod.yml push | ||
|
|
||
| - name: Deploy to EC2 | ||
| uses: appleboy/ssh-action@v1.0.3 | ||
| env: | ||
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| DEPLOY_SHA: ${{ github.event.workflow_run.head_sha }} | ||
| with: | ||
| host: ${{ secrets.EC2_HOST }} | ||
| username: ${{ secrets.EC2_USER }} | ||
| key: ${{ secrets.EC2_SSH_KEY }} | ||
| envs: DOCKERHUB_USERNAME,DEPLOY_SHA | ||
| script: | | ||
| cd ~/CoinFlow | ||
| git fetch origin master | ||
| git checkout "$DEPLOY_SHA" | ||
|
|
||
| export DOCKERHUB_USERNAME=$DOCKERHUB_USERNAME | ||
|
|
||
| cd infra/docker | ||
| docker compose -f docker-compose-prod.yml pull | ||
| docker compose -f docker-compose-prod.yml up -d | ||
| docker compose -f docker-compose-prod.yml restart nginx | ||
| docker image prune -f | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ "master" ] | ||
| paths: | ||
| - 'backend/**' | ||
| - 'frontend/**' | ||
| - 'infra/docker/**' | ||
| - '.github/workflows/**' | ||
| push: | ||
| branches: [ "master" ] | ||
| paths: | ||
| - 'backend/**' | ||
| - 'frontend/**' | ||
| - 'infra/docker/**' | ||
| - '.github/workflows/**' | ||
|
|
||
| jobs: | ||
| backend-test: | ||
| name: Backend Test | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'corretto' | ||
| cache: gradle | ||
|
|
||
| - name: Run backend tests | ||
| run: | | ||
| cd backend | ||
| chmod +x ./gradlew | ||
| ./gradlew test --continue | ||
|
|
||
| frontend-check: | ||
| name: Frontend Lint And Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: npm | ||
| cache-dependency-path: frontend/package-lock.json | ||
|
|
||
| - name: Install frontend dependencies | ||
| run: | | ||
| cd frontend | ||
| npm ci | ||
|
|
||
| - name: Run frontend lint | ||
| run: | | ||
| cd frontend | ||
| npm run lint | ||
|
|
||
| - name: Build frontend | ||
| run: | | ||
| cd frontend | ||
| npm run build | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.