Skip to content

[Feat] Run step 추가 #84

[Feat] Run step 추가

[Feat] Run step 추가 #84

Workflow file for this run

name: pothole Build & Test & Run
on:
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: GitHub Repository Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: application.yml 생성
shell: bash
run: |
mkdir -p ./pothole-core/src/main/resources
cd ./pothole-core/src/main/resources
touch ./application-core-dev.yml
echo "${{ secrets.CORE_APPLICATION_DEV_YML }}" > ./application-core-dev.yml
mkdir -p ./pothole-manager-api/src/main/resources
cd ./pothole-manager-api/src/main/resources
touch ./application.yml
echo "${{ secrets.MANAGER_APPLICATION_YML }}" > ./application.yml
touch ./application-aws.yml
echo "${{ secrets.MANAGER_APPLICATION_DEV_YML }}" > ./application-manager-dev.yml
mkdir -p ./pothole-worker-api/src/main/resources
cd ./pothole-worker-api/src/main/resources
touch ./application.yml
echo "${{ secrets.WORKER_APPLICATION_YML }}" > ./application.yml
touch ./application-aws.yml
echo "${{ secrets.WORKER_APPLICATION_DEV_YML }}" > ./application-worker-dev.yml
- name: Pothole [Core] Module Build with Gradle
run: ./gradlew clean pothole-core:bootJar -x test
- name: Pothole [Core] Module test
run: ./gradlew clean pothole-core:test
- name: Pothole [Manager] Module Build with Gradle
run: ./gradlew clean pothole-manager-api:bootJar -x test
- name: Pothole [Manager] Module test
run: ./gradlew clean pothole-manager-api:test
- name: Pothole [Worker] Module Build with Gradle
run: ./gradlew clean pothole-worker-api:bootJar -x test
- name: Pothole [Worker] Module test
run: ./gradlew clean pothole-worker-api:test
- name: Manager 모듈 실행
if: (contains(github.head_ref, 'manager') || contains(github.head_ref, 'core'))
run: |
cd ./pothole-manager-api
ls -l
java -Dspring.profiles.active=manager-dev -jar /build/libs/*.jar
- name: worker 모듈 실행
if: (contains(github.head_ref, 'worker') || contains(github.head_ref, 'core'))
run: |
cd ./pothole-worker-api
ls -l
java -Dspring.profiles.active=worker-dev -jar /build/libs/*.jar