Skip to content

Commit

Permalink
Feat : 코딩 컨벤션 체크 ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Astin01 committed Jul 21, 2024
1 parent 235fa55 commit 6f56ce4
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Backend CI

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Set PROP
run: |
mkdir -p src/main/resources
echo "${{ secrets.APPLICATION_YML }}" | base64 --decode > src/main/resources/application.yml
find src
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run Spotless Check
run: ./gradlew spotlessCheck

- name: Build with Gradle
run: ./gradlew build


16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'com.diffplug.spotless' version '7.0.0.BETA1'
}

group = 'solitour-backend'
Expand All @@ -28,6 +29,21 @@ ext {
set('snippetsDir', file("build/generated-snippets"))
}

spotless {
ratchetFrom 'origin/main'

format 'misc', {
target '*.gradle', '.gitattributes', '.gitignore'

trimTrailingWhitespace()
indentWithTabs()
endWithNewline()
}
java {
googleJavaFormat()
}
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
Expand Down

0 comments on commit 6f56ce4

Please sign in to comment.