Skip to content

Refactor: 캘린더뷰 및 리스트뷰 일기 조회 리팩토링 #16

Refactor: 캘린더뷰 및 리스트뷰 일기 조회 리팩토링

Refactor: 캘린더뷰 및 리스트뷰 일기 조회 리팩토링 #16

Workflow file for this run

name: Run Tests on Changed Modules
on:
pull_request:
branches: [ prod ]
permissions: write-all
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 체크아웃
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '21'
- name: Cache Gradle packages
uses: actions/cache@v2
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: Detect changed modules
id: changed_modules
run: |
echo "CHANGED_MODULES=$(git diff --name-only origin/prod | cut -d'/' -f1 | uniq)" >> $GITHUB_ENV
- name: Run tests on changed modules
run: |
for module in $CHANGED_MODULES; do
./gradlew --info :$module:test
done
# 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: ${{ always() }} # 테스트가 실패하여도 Report를 보기 위해 `always`로 설정
with:
files: build/test-results/**/*.xml