Skip to content

โœจ [Feat] ๋ชจ๋‹ˆํ„ฐ๋ง ๋„๊ตฌ ๋„์ž… #6

โœจ [Feat] ๋ชจ๋‹ˆํ„ฐ๋ง ๋„๊ตฌ ๋„์ž…

โœจ [Feat] ๋ชจ๋‹ˆํ„ฐ๋ง ๋„๊ตฌ ๋„์ž… #6

Workflow file for this run

name: SCOI CI
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
# CI ์„œ๋ฒ„ ๋‚ด๋ถ€์—์„œ ํ…Œ์ŠคํŠธ์šฉ DB/Redis ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: scoi
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:latest
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: ์ฒดํฌ์•„์›ƒ
uses: actions/checkout@v4
- name: ์ž๋ฐ” ์„ค์ • Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- name: application.yml ์ฃผ์ž…
shell: bash
run: |
mkdir -p src/main/resources
cat > src/main/resources/application.yml <<'EOF'
${{ secrets.DEV_APPLICATION_YML }}
EOF
# firebase ํŒŒ์ผ ์ƒ์„ฑ
- name: firebase json ์ฃผ์ž…
shell: bash
run: |
mkdir -p src/main/resources
cat > src/main/resources/firebase-scoi.json <<'EOF'
${{ secrets.FIREBASE_JSON }}
EOF
- name: gradlew ์‹คํ–‰ ๊ถŒํ•œ ๋ถ€์—ฌ
run: chmod +x gradlew
- name: gradle ๋นŒ๋“œ
run: ./gradlew build
# CI์šฉ
env:
DB_URL: jdbc:mysql://localhost:3306/scoi?serverTimezone=Asia/Seoul
DB_USERNAME: root
DB_PASSWORD: root
REDIS_HOST: localhost
REDIS_PORT: 6379
JWT_KEY: scoi-test-key
JWT_SECRET: scoi-test-secret-keysdsdsdsdsdsdssdsdsdsdsdsdsdsdsdsdsdsdsdsdsds
COOLSMS_API_URL: test_coolsms_api_key
COOLSMS_API_SECRET: test_coolsms_secret_key
COOLSMS_API_KEY: test_coolsms_key
COOLSMS_FROM_NUMBER: 01000000000