Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
47 changes: 47 additions & 0 deletions .github/workflows/gradleCI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Java CI with Gradle

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "*" ]

permissions:
contents: read


jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

# 환경별 properties 파일 생성 - API-KEY
- name: make application-API-KEY.properties
run: |
cd ./src/main/resources
touch ./application-API-KEY.properties
echo "${{ secrets.YML_CI }}" > ./application-API-KEY.properties
shell: bash

- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew

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

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ test {
}
jacocoTestReport {
dependsOn test
reports{
xml.required = true
}
afterEvaluate {

classDirectories.setFrom(files(classDirectories.files.collect {
Expand Down