Skip to content

Commit

Permalink
Update server-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zzawang authored May 20, 2024
1 parent e8bf6c1 commit e85af09
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI with Gradle

on:
push:
branches: [ "be/milestones" ]
branches: [ "be/**" ]
pull_request:
branches: [ "be/milestones ]
branches: [ "be/** ]

# 워크플로우가 저장소의 콘텐츠를 읽을 수 있는 권한을 갖도록 설정
permissions:
Expand All @@ -27,19 +27,8 @@ jobs:
- name: Make application.properties
run: |
cd ./be/issue-tracker/src/main/resources
rm -rf ./application.properties
touch ./application.properties
echo "spring.application.name=issue-tracker" > application.properties
echo "spring.datasource.url=${{ secrets.DB_URL }}" > application.properties
echo "spring.datasource.username=${{ secrets.DB_USERNAME }}" >> application.properties
echo "spring.datasource.password=${{ secrets.DB_PASSWORD }}" >> application.properties
echo "cloud.aws.credentials.access-key=${{ secrets.S3_ACCESS_KEY }}" >> application.properties
echo "cloud.aws.credentials.secret-key=${{ secrets.S3_SECRET_KEY }}" >> application.properties
echo "cloud.aws.region.static=ap-northeast-2" >> application.properties
echo "cloud.aws.s3.bucket=sangchu-bucket" >> application.properties
echo "cloud.aws.s3.dir=issue-tracker/img/" >> application.properties
echo "spring.servlet.multipart.max-file-size=10MB" >> application.properties
echo "spring.servlet.multipart.max-request-size=10MB" >> application.properties
echo "${{ secrets.PROPERTIES }}" > ./application.properties
shell: bash

- name: Grant execute permission for gradlew
Expand All @@ -50,12 +39,12 @@ jobs:
# Gradle Daemon을 사용하지 않도록 지정
# CI 환경에서는 Daemon을 사용하지 않는 것이 일반적
# 이유는 각 빌드가 깨끗한 환경에서 실행되며, Daemon이 이전 빌드의 상태를 유지하지 않기 때문
- name: Build with Gradle
run: |
cd ./be/issue-tracker
./gradlew build --no-daemon
- name: Run tests with Gradle
run: |
cd ./be/issue-tracker
./gradlew test --no-daemon
- name: Build with Gradle
run: |
cd ./be/issue-tracker
./gradlew build -x test --no-daemon

0 comments on commit e85af09

Please sign in to comment.