-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Gitactions Test (#1) * feat : 소나큐브 플러그인 의존성추가 * fix: 그래들 파일 수정 * feat: CI용 워크플로우생성 * feat : 테스트용 커밋 * fix: 잘못된 디렉토리명 수정 * feat : CI실패 시 디스코드 알림 추가 * test : CI 테스트를 위한 커밋 * feat: 그래들 캐시 추가, 불필요한 스크립트 제거
- Loading branch information
1 parent
8832e10
commit c00877f
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,46 @@ | ||
name: SonarCloud | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
name: Build and analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: grant permission to gradle | ||
run: chmod +x gradlew | ||
|
||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew build sonar --info | ||
|
||
- name: Backend CI Discord Notification | ||
uses: sarisia/actions-status-discord@v1 | ||
if: ${{ failure() }} | ||
with: | ||
title: ❗️ Backend CI failed ❗️ | ||
webhook: ${{ secrets.DISCORD_URL }} | ||
color: FF0000 |
This file contains 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