Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

#47 jacoco badge 생성 #73

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
67 changes: 37 additions & 30 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,43 @@ jobs:
build:

runs-on: ubuntu-latest
env :
env:
working-directory: ./

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ${{ env.working-directory }}
- name: Build with Gradle
env:
MYSQL_URL: ${{ secrets.MYSQL_URL }}
MYSQL_PORT: ${{ secrets.MYSQL_PORT }}
MYSQL_DBNAME: ${{ secrets.MYSQL_DBNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
AUTHORIZATION: ${{ secrets.AUTHORIZATION }}
run: ./gradlew build
working-directory: ${{ env.working-directory }}
- name: build result to slack
uses: 8398a7/action-slack@v3
with:
status: ${{job.status}}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
author_name: Door rush CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ${{ env.working-directory }}
- name: Build with Gradle
env:
MYSQL_URL: ${{ secrets.MYSQL_URL }}
MYSQL_PORT: ${{ secrets.MYSQL_PORT }}
MYSQL_DBNAME: ${{ secrets.MYSQL_DBNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
AUTHORIZATION: ${{ secrets.AUTHORIZATION }}
run: ./gradlew build
working-directory: ${{ env.working-directory }}
- name: build result to slack
uses: 8398a7/action-slack@v3
with:
status: ${{job.status}}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
author_name: Door rush CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required

- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/[email protected]
with:
badges-directory: badges
generate-branches-badge: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![coverage](../badges/jacoco.svg)](https://github.com/f-lab-edu/DoorRush/actions/workflows/gradle.yml)
# DoorRush

---
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ jacocoTestReport {
}
reports {
xml.required = false
csv.required = false
csv.required = true
html.required = true
csv.enabled true
}

finalizedBy jacocoTestCoverageVerification
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# Spring
spring:
datasource:
url: jdbc:mysql://${MYSQL_URL}:${MYSQL_PORT}/${MYSQL_DBNAME}?serverTimezone=UTC&characterEncoding=UTF-8
# url: jdbc:mysql://${MYSQL_URL}:${MYSQL_PORT}/${MYSQL_DBNAME}?serverTimezone=UTC&characterEncoding=UTF-8
url: jdbc:mysql://localhost:${MYSQL_PORT}/${MYSQL_DBNAME}?serverTimezone=UTC&characterEncoding=UTF-8
username: ${MYSQL_USERNAME}
password: ${MYSQL_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


@ActiveProfiles("test")
@SpringBootTest(webEnvironment = WebEnvironment.NONE)
@SpringBootTest
@AutoConfigureWireMock(port = 0)
class KakaoAddressApiTest {

Expand Down