Skip to content

chore: ci 수정 및 application.properties 변경 #10

chore: ci 수정 및 application.properties 변경

chore: ci 수정 및 application.properties 변경 #10

Workflow file for this run

name: CI
permissions:
checks: write
pull-requests: write
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: touch ./src/main/resources/application-oauth.properties
- run: echo "${{ secrets.APPLICATION_OAUTH }}" > ./src/main/resources/application-oauth.properties
- run: cat ./src/main/resources/application-oauth.properties
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Setup MySQL
uses: samin/mysql-action@v1.3
with:
character set server: "utf8"
mysql database: "milkweb"
mysql version: '8.0'
mysql root password: ${{secrets.MY_SQL_PWD}}
- name: Test MySQL Connection
run: |
mysql -h localhost -u root -p1234 -e "SELECT 1;"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
# 테스트 후 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: build/test-results/**/*.xml