Skip to content

Commit

Permalink
Test/test ci (#2)
Browse files Browse the repository at this point in the history
* Gitactions Test (#1)

* feat : 소나큐브 플러그인 의존성추가

* fix: 그래들 파일 수정

* feat: CI용 워크플로우생성

* feat : 테스트용 커밋

* fix: 잘못된 디렉토리명 수정

* feat : CI실패 시 디스코드 알림 추가

* test : CI 테스트를 위한 커밋

* feat: 그래들 캐시 추가, 불필요한 스크립트 제거
  • Loading branch information
ekgns33 authored and goldentrash committed Aug 27, 2024
1 parent 8832e10 commit c00877f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-workflow.yml
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public class PlatformCoreApplication {

public static void main(String[] args) {
SpringApplication.run(PlatformCoreApplication.class, args);
System.out.println("TESTCITEST");
}
}

0 comments on commit c00877f

Please sign in to comment.