Skip to content

Implement anonymous sign-up API #63

Implement anonymous sign-up API

Implement anonymous sign-up API #63

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches: [ "develop" ]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: false
permissions:
contents: read
jobs:
develop-test:
runs-on: ubuntu-22.04
steps:
# 1. Compare branch 코드 내려 받기
- name: Checkout PR
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
# 2. 자바 환경 설정
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# 3. Spring 환경 변수 설정
- name: Set up application.yml
run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.APPLICATION }}" > ./application.yml
touch ./application-dev.yml
echo "${{ secrets.APPLICATION_TEST }}" > ./application-test.yml
touch ./application-test.yml
echo "${{ secrets.APPLICATION_DEV }}" > ./application-dev.yml
touch ./application-prod.yml
echo "${{ secrets.APPLICATION_PROD }}" > ./application-prod.yml
mkdir ./firebase
shell: bash
# 4. Firebase를 위한 JSON 파일 생성
- name: Create Json
uses: jsdaniell/[email protected]
with:
name: "./src/main/resources/firebase/gifthub-b2dcb-firebase-adminsdk-yj7uq-912097b9ae.json"
json: ${{ secrets.FIREBASE_JSON }}
# 5. 테스트를 위한 MySQL 설정
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql database: ${{ secrets.MYSQL_TEST_DATABASE }}
mysql user: ${{ secrets.MYSQL_TEST_USER }}
mysql password: ${{ secrets.MYSQL_TEST_PASSWORD }}
# 6. 테스트를 위한 빌드 실행
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25
with:
arguments: |
test
env:
SPRING_PROFILES_ACTIVE: test