From 186f379f342d451ef8ef841956e43f1df7a56a9b Mon Sep 17 00:00:00 2001 From: kssumin <201566@jnu.ac.kr> Date: Tue, 26 Sep 2023 21:01:16 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20(#6)=20github=20actions=EB=A5=BC=20?= =?UTF-8?q?=EC=9D=B4=EC=9A=A9=ED=95=9C=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f264046 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: ci + +on: + pull_request: + branches: + - weekly # 'weekly' 브랜치로 PR이 생성될 때만 실행 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Cache Gradle dependencies + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Build and Test + run: ./gradlew clean build + - name: Run Spring Boot App for 30 seconds + run: | + ./gradlew bootRun & + APP_PID=$! + sleep 30 + kill $APP_PID + continue-on-error: false \ No newline at end of file