Skip to content

Feature: (BRD-92) 게시판 추가 기능 #348

Feature: (BRD-92) 게시판 추가 기능

Feature: (BRD-92) 게시판 추가 기능 #348

Workflow file for this run

name: Build-Test
on:
pull_request:
branches:
- master
jobs:
Build-Test:
runs-on: ubuntu-latest
env:
DB_NAME: board_db_test
DB_ROOT_PASSWORD: root
DB_TEST_USERNAME: board_user_test
DB_TEST_USER_PASSWORD: db1004
steps:
- name: Check Out (체크 아웃)
uses: actions/checkout@v4
- name: 데이터베이스 설정
run: |
sudo /etc/init.d/mysql start
mysql -e "CREATE DATABASE ${{ env.DB_NAME }};" -uroot -p${{ env.DB_ROOT_PASSWORD }}
mysql -e "CREATE user '${{ env.DB_TEST_USERNAME }}'@'%' IDENTIFIED BY '${{ env.DB_TEST_USER_PASSWORD }}';" -uroot -p${{ env.DB_ROOT_PASSWORD }}
mysql -e "GRANT ALL ON *.* TO '${{ env.DB_TEST_USERNAME }}'@'%';" -uroot -p${{ env.DB_ROOT_PASSWORD }}
mysql -e "FLUSH PRIVILEGES;" -uroot -p${{ env.DB_ROOT_PASSWORD }}
- name: Redis 설정
uses: supercharge/[email protected]
with:
redis-version: 7.4.1
- name: Setup Java Version (Java 21 설정)
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Use Gradle Cache (Gradle 캐싱)
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew (gradlew에 권한 부여)
run: chmod +x gradlew
shell: bash
- name: Test (테스트)
run: ./gradlew build