Skip to content

Commit

Permalink
chore: yml 파일 구조 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
SSung023 committed Apr 9, 2024
1 parent c7faa87 commit df34718
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,20 @@ jobs:
mkdir -p ./src/main/resources
cd ./src/main/resources
touch ./application.yml
touch ./application-common.yml
touch ./application-prod.yml
echo "${{ secrets.APPLICATION }}" > ./application.yml
echo "${{ secrets.COMMON }}" > ./application-common.yml
echo "${{ secrets.PROD }}" > ./application-prod.yml
- name: make other application-{profile}.yml
- name: make test application.yml
run: |
cd ./src/main/resources
touch ./application-config.yml
echo "${{ secrets.CONFIG }}" > ./application-config.yml
touch ./application-db.yml
echo "${{ secrets.DATABASE }}" > ./application-db.yml
touch ./application-file.yml
echo "${{ secrets.FILE }}" > ./application-file.yml
touch ./application-github.yml
echo "${{ secrets.GITHUB }}" > ./application-github.yml
touch ./application-jwt.yml
echo "${{ secrets.JWT }}" > ./application-jwt.yml
touch ./application-oauth.yml
echo "${{ secrets.OAUTH }}" > ./application-oauth.yml
touch ./application-payment.yml
echo "${{ secrets.PAYMENT }}" > ./application-payment.yml
mkdir -p ./src/test/resources
cd ./src/test/resources
touch ./application.yml
touch ./application-test.yml
echo "${{ secrets.APPLICATION_TEST }}" > ./application.yml
echo "${{ secrets.TEST }}" > ./application-test.yml
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ dependencies {

// MongoDB
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
testImplementation 'de.flapdoodle.embed:de.flapdoodle.embed.mongo'

// H2
implementation 'com.h2database:h2'
runtimeOnly 'com.h2database:h2:2.2.222'
testRuntimeOnly 'com.h2database:h2'

// Github API for Java
implementation 'org.kohsuke:github-api:1.318'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Table(name = "user")
@Table(name = "users")
public class User extends BaseTimeEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.springframework.security.crypto.encrypt.AesBytesEncryptor;

@Configuration
@PropertySource("classpath:application-github.yml")
@PropertySource("classpath:application-common.yml")
@RequiredArgsConstructor
public class AppConfig {
private final Environment env;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.genius.gitget.challenge.user.repository.UserRepository;
import com.genius.gitget.global.security.constants.JwtRule;
import com.genius.gitget.global.security.constants.ProviderInfo;
import com.genius.gitget.global.security.repository.TokenRepository;
import com.genius.gitget.global.util.exception.BusinessException;
import com.genius.gitget.global.util.exception.ErrorCode;
import com.genius.gitget.util.TokenTestUtil;
Expand Down Expand Up @@ -41,8 +40,6 @@ class JwtServiceTest {
@Autowired
private UserRepository userRepository;
@Autowired
private TokenRepository tokenRepository;
@Autowired
private TokenTestUtil tokenTestUtil;

@Test
Expand Down
22 changes: 22 additions & 0 deletions src/test/resources/data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
INSERT INTO item (cost, created_at, deleted_at, updated_at, details, name, item_category)
SELECT *
FROM (SELECT 100 AS cost,
NULL AS created_at,
NULL AS deleted_at,
NULL AS updated_at,
'프로필을 꾸밀 수 있는 프레임입니다.' AS details,
'성탄절 프레임' AS name,
'PROFILE_FRAME' AS item_category
UNION ALL
SELECT 100, NULL, NULL, NULL, '프로필을 꾸밀 수 있는 프레임입니다.', '어둠의 힘 프레임', 'PROFILE_FRAME'
UNION ALL
SELECT 100, NULL, NULL, NULL, '오늘의 인증을 넘길 수 있는 아이템입니다.', '인증 패스권', 'CERTIFICATION_PASSER'
UNION ALL
SELECT 100,
NULL,
NULL,
NULL,
'아이템 사용 시, 챌린지 성공 보상을 2배로 획득할 수 있는 아이템입니다.',
'챌린지 보상 획득 2배 아이템',
'POINT_MULTIPLIER') AS new_items
WHERE (SELECT COUNT(*) FROM item) < 3;

0 comments on commit df34718

Please sign in to comment.