feat: stempo-common
모듈 테스트 코드 작성 완료
#57
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: | |
build: | |
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: Build and test with Gradle | |
run: ./gradlew build test --args='-Dspring.profiles.active=test' | |
- name: Check build status | |
run: | | |
if [[ $? -ne 0 ]]; then | |
echo "Build failed!" | |
exit 1 | |
else | |
echo "Build succeeded!" | |
fi |