From 9807b17f83c606da57e1ca6ceb21d9912144a8f9 Mon Sep 17 00:00:00 2001 From: Jimin0304 Date: Wed, 2 Aug 2023 18:55:50 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20gradle.yml=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20build.gradle=20test=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 86 +++++++++---------- build.gradle | 4 - src/main/resources/application-datasource.yml | 5 +- 3 files changed, 44 insertions(+), 51 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 75d02a6..1e1bb0a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,43 +1,43 @@ -## This workflow uses actions that are not certified by GitHub. -## They are provided by a third-party and are governed by -## separate terms of service, privacy policy, and support -## documentation. -## This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -## For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle -# -#name: Java CI with Gradle -# -#on: -# push: -# branches: [ "*" ] -# pull_request: -# branches: [ "develop" ] -# -#permissions: -# contents: read -# -#jobs: -# build: -# -# runs-on: ubuntu-latest -# -# steps: -# - uses: actions/checkout@v3 -# - name: Set up JDK 17 -# uses: actions/setup-java@v3 -# with: -# java-version: '17' -# distribution: 'temurin' -# - name: Setup MySQL -# uses: samin/mysql-action@v1 -# with: -# character set server: 'utf8' -# mysql database: 'iHangbot' -# mysql user: ${{ secrets.DATASOURCE_USERNAME }} -# mysql password: ${{ secrets.DATASOURCE_PASSWORD }} -# - name: Run chmod to make gradlew executable -# run: chmod +x ./gradlew -# - name: Build with Gradle -# uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 -# with: -# arguments: build +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "*" ] + pull_request: + branches: [ "develop" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Setup MySQL + uses: samin/mysql-action@v1 + with: + character set server: 'utf8' + mysql database: 'iHangbot' + mysql user: ${{ secrets.DATASOURCE_USERNAME }} + mysql password: ${{ secrets.DATASOURCE_PASSWORD }} + - name: Run chmod to make gradlew executable + run: chmod +x ./gradlew + - name: Build with Gradle + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: build diff --git a/build.gradle b/build.gradle index 10adc49..effa82e 100644 --- a/build.gradle +++ b/build.gradle @@ -23,8 +23,4 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.0' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.json:json:20220924' -} - -test { - useJUnitPlatform() } \ No newline at end of file diff --git a/src/main/resources/application-datasource.yml b/src/main/resources/application-datasource.yml index 26b536d..ad77885 100644 --- a/src/main/resources/application-datasource.yml +++ b/src/main/resources/application-datasource.yml @@ -1,9 +1,6 @@ spring: datasource: - driver-class-name: com.mysql.cj.jdbc.Driver url: ${DATASOURCE_URL} username: ${DATASOURCE_USERNAME} password: ${DATASOURCE_PASSWORD} -# url: jdbc:mysql://127.0.0.1:3306/iHangbot -# username: root -# password: 1234 \ No newline at end of file + driver-class-name: com.mysql.cj.jdbc.Driver \ No newline at end of file