-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.49 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Java CI with Gradle
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
# 체크아웃
- name: Checkout
uses: actions/checkout@v4
- name: Setup application.properties
run: |
touch ./src/main/resources/application.properties
echo "${{ secrets.CI_APPLICATION }}" > ./src/main/resources/application.properties
cat ./src/main/resources/application.properties
# gradlew 권한 추가
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
# JDK 21 세팅
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
# Gradle test and build
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Test With Gradle Wrapper
run: ./gradlew test
- name: Build with Gradle Wrapper
run: ./gradlew build
# checkstyle 검사
- name: Run java checkstyle
uses: nikitasavinov/checkstyle-action@0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-pr-check'
tool_name: 'Checkstyle'
checkstyle_config: ./config/naver-checkstyle-rules.xml
properties_file: ./config/naver-checkstyle-suppressions.xml