[FEAT] 데이터베이스 스키마에 대한 형상 관리를 위한 Flyway 적용 #161
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Java CI with Gradle in mogakGo | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ "main", "develop" ] | |
permissions: | |
checks: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
## Gradle Wrapper grant permission | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
## create application.yml | |
- name: make application.yml | |
run: | | |
mkdir -p ./src/main/resources | |
touch ./src/main/resources/application.yml | |
shell: bash | |
- name: save application.yml for secrets | |
run: echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.yml | |
shell: bash | |
## create test_application.yml | |
- name: make test_application.yml | |
run: | | |
mkdir -p ./src/test/resources | |
touch ./src/test/resources/application.yml | |
shell: bash | |
- name: save test_application.yml for secrets | |
run: echo "${{ secrets.APPLICATION_TEST }}" > ./src/test/resources/application.yml | |
shell: bash | |
## create firebase_service_key.json | |
- name: create-json | |
id: create-json | |
uses: jsdaniell/[email protected] | |
with: | |
name: "firebase_service_key.json" | |
json: ${{ secrets.FIREBASE_SERVICE }} | |
dir: ./src/main/resources/ | |
# - name: make firebase_service_key.json | |
# run: touch ./src/main/resources/firebase_service_key.json | |
# shell: bash | |
# | |
# - name: save firebase_service_key.json from secrets | |
# run: echo "${{ secrets.FIREBASE_SERVICE }}" > ./src/main/resources/firebase_service_key.json | |
# shell: bash | |
## create test_ddl.sql for test | |
## execute Gradle test | |
- name: Test with Gradle | |
run: ./gradlew --info test | |
## create Report after Test | |
- name: Public Test results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: '**/build/test-results/test/TEST-*.xml' | |
## make comment about error | |
- name: add comments to pull-request | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' |