diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index de60ed3..f68dc49 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -1,51 +1,51 @@ -#name: Spring build gradle -# -#on: -## push: -## branches: -## - develop -# -# pull_request: +name: Spring build gradle + +on: +# push: # branches: -# - main # pull request 시에 적용되는 branch 에다가 적용 -# -#jobs: -# build: -# runs-on: ubuntu-latest -# env: -# working-directory: /home/runner/work/dogVelopersServer/dogVelopersServer/dogvelopers -# key: ${{ secrets.KEY }} -# -# steps: -# - uses: actions/checkout@v2 -## - uses: mikepenz/action-junit-report@v2 -# -# # 소스코드들은 11을 위주로 짰음 -# - name: Set up Jdk 11 -# uses: actions/setup-java@v1 -# with: -# java-version: 11 -# -# # Gradle wrapper 파일 실행 권한주기 -# - name: Grant execute permission for gradlew -# run: chmod +x gradlew -# working-directory: ${{ env.working-directory }} -# -# # Gradle test를 실행한다 -# - name: Test with Gradle -# run: ./gradlew test -# working-directory: ${{ env.working-directory }} -# -# # 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가 -# - name: Publish Unit Test Results -# uses: EnricoMi/publish-unit-test-result-action@v1 -# if: ${{ always() }} # 테스트가 실패하여도 Report를 보기 위해 `always`로 설정 -# with: -# files: dogvelopers/build/test-results/**/*.xml # junit report xml 을 가르킴 -# -# - name: gradle build -# run: ./gradlew build -# working-directory: ${{ env.working-directory }} -# -# - name: send to aws -# run: scp -i ${{env.key}} ~/Desktop/dogvelopers.jar ubuntu@54.180.208.212:~/daemon +# - develop + + pull_request: + branches: + - main # pull request 시에 적용되는 branch 에다가 적용 + +jobs: + build: + runs-on: ubuntu-latest + env: + working-directory: /home/runner/work/dogVelopersServer/dogVelopersServer/dogvelopers + key: ${{ secrets.KEY }} + + steps: + - uses: actions/checkout@v2 +# - uses: mikepenz/action-junit-report@v2 + + # 소스코드들은 11을 위주로 짰음 + - name: Set up Jdk 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + # Gradle wrapper 파일 실행 권한주기 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + working-directory: ${{ env.working-directory }} + + # Gradle test를 실행한다 + - name: Test with Gradle + run: ./gradlew test + working-directory: ${{ env.working-directory }} + + # 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가 + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + if: ${{ always() }} # 테스트가 실패하여도 Report를 보기 위해 `always`로 설정 + with: + files: dogvelopers/build/test-results/**/*.xml # junit report xml 을 가르킴 + + - name: gradle build + run: ./gradlew build + working-directory: ${{ env.working-directory }} + + - name: send to aws + run: scp -i ${{env.key}} ~/Desktop/dogvelopers.jar ubuntu@54.180.208.212:~/daemon