feat: stempo-common
모듈 테스트 코드 작성 완료
#61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Spring Boot Gradle CI | |
on: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/[email protected] | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Create application-test.yml from secret | |
env: | |
COMMON_TEST_YML: ${{ secrets.COMMON_TEST_YML }} | |
COMMON_TEST_DIR: ./stempo-common/src/test/resources | |
COMMON_DIR_FILE_NAME: application-test.yml | |
run: | | |
mkdir -p $COMMON_TEST_DIR | |
echo $COMMON_TEST_YML | base64 --decode > $COMMON_TEST_DIR/$COMMON_DIR_FILE_NAME | |
- name: Run tests with Gradle | |
run: ./gradlew test -Dspring.profiles.active=test --info | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/[email protected] | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --info | |
- name: Check build status | |
run: | | |
if [[ $? -ne 0 ]]; then | |
echo "Build failed!" | |
exit 1 | |
else | |
echo "Build succeeded!" | |
fi |