Skip to content

Commit 1eff011

Browse files
committed
chore: ci 설정
1 parent 5b20f32 commit 1eff011

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: ci-${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
gradle-test:
21+
name: Java 21 Gradle Test
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 20
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Java 21
30+
uses: actions/setup-java@v4
31+
with:
32+
distribution: temurin
33+
java-version: '21'
34+
35+
- name: Set up Gradle
36+
uses: gradle/actions/setup-gradle@v4
37+
with:
38+
gradle-version: '8.10.2'
39+
40+
- name: Make Gradle wrapper executable
41+
if: ${{ hashFiles('gradlew') != '' }}
42+
run: chmod +x ./gradlew
43+
44+
- name: Run tests and quality checks
45+
shell: bash
46+
run: |
47+
if [[ -f ./gradlew ]]; then
48+
./gradlew clean check --no-daemon --stacktrace
49+
else
50+
gradle clean check --no-daemon --stacktrace
51+
fi
52+
53+
- name: Upload Gradle test and quality reports
54+
if: always()
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: gradle-reports-${{ github.run_number }}
58+
path: |
59+
**/build/reports/**
60+
**/build/test-results/**/*.xml
61+
if-no-files-found: warn
62+
retention-days: 14

0 commit comments

Comments
 (0)