Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BSVR-62] 개발단계 ci github actions 스크립트 추가 #10

Merged
merged 5 commits into from
Jul 3, 2024
Merged
Changes from all 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
71 changes: 71 additions & 0 deletions .github/workflows/dev-ci.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스크린샷 2024-07-03 오후 5 18 12

테스트 관련 CI가 pr labeler로 분류된 것 같은데, 이건 우리가 컨트롤 할 수 없는 영역일까?

Copy link
Collaborator Author

@pminsung12 pminsung12 Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on trigger를 한정지어봤는데 그래도 안되네 흠..

Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build And Test

on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "corretto"

- name: Cache Gradle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build -x test --stacktrace --parallel

- name: Run tests
run: ./gradlew test

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/build/test-results/test/TEST-*.xml'

- name: JUnit Report Action
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Store test results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: '**/build/test-results/test/TEST-*.xml'

- name: Test Report Summary
if: always()
run: |
echo '## Test Report Summary' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
./gradlew test --console=plain || true
echo '```' >> $GITHUB_STEP_SUMMARY
Loading