Skip to content

Commit 353cb90

Browse files
authored
ci: minimal CI workflows (#11)
- Introduce GitHub Actions workflows to automate builds, tests, and test report summarization. - Add branch-specific triggers for `push` and `pull_request` events, and skip runs for draft pull requests.
1 parent bb7936b commit 353cb90

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Continuous Integration'
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
pull_request:
8+
branches: [ main ]
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
- ready_for_review
14+
15+
jobs:
16+
build:
17+
if: >
18+
github.event_name == 'push' ||
19+
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
20+
name: Build
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-java@v4
26+
with:
27+
distribution: temurin
28+
java-version: 17
29+
30+
- name: Setup Gradle
31+
uses: gradle/actions/setup-gradle@v5
32+
with:
33+
cache-read-only: false
34+
35+
- name: Build (Check, Compile, Test)
36+
id: build
37+
continue-on-error: true
38+
run: ./gradlew build
39+
40+
- name: Summarize Test Report
41+
uses: dorny/test-reporter@v2
42+
if: ${{ !cancelled() }}
43+
with:
44+
name: Test Report
45+
path: '**/build/test-results/test/TEST-*.xml'
46+
reporter: java-junit
47+
48+
- name: Fail job if build failed
49+
if: ${{ steps.build.outcome == 'failure' }}
50+
run: exit 1

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
group=com.kakao.actionbase
22
version=0.0.1-SNAPSHOT
3+
4+
org.gradle.caching=true

0 commit comments

Comments
 (0)