Skip to content

Commit cd949e1

Browse files
authored
🔖 release: v0.0.1
2 parents 162c62c + 0ba0181 commit cd949e1

File tree

109 files changed

+2676
-166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2676
-166
lines changed

.github/workflows/bump-version.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: release
2+
on:
3+
pull_request:
4+
types:
5+
- labeled
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: haya14busa/action-bumpr@v1

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
next_version: ${{ steps.bump.outputs.next_version }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: haya14busa/action-bumpr@v1
19+
id: bump
20+
21+
package:
22+
runs-on: ubuntu-latest
23+
needs: release
24+
25+
permissions:
26+
contents: read
27+
packages: write
28+
attestations: write
29+
id-token: write
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: docker/login-action@v3
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
40+
41+
- uses: docker/metadata-action@v5
42+
id: meta
43+
with:
44+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
45+
tags: |
46+
type=raw,value=latest
47+
type=raw,value=${{ needs.release.outputs.next_version }}
48+
49+
- uses: docker/build-push-action@v6
50+
with:
51+
context: ./backend
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
branches: [ dev ]
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
env:
11+
PROJECT_DIR: backend
12+
KAKAO_CLIENT: ${{ secrets.KAKAO_CLIENT }}
13+
KAKAO_SECRET: ${{ secrets.KAKAO_SECRET }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '21'
21+
distribution: 'temurin'
22+
23+
- name: Setup Gradle
24+
uses: gradle/actions/setup-gradle@v4
25+
26+
- name: Run tests
27+
run: ./gradlew test
28+
working-directory: ${{ env.PROJECT_DIR }}
29+
30+
- name: Upload test report
31+
if: always()
32+
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: junit-test-report
36+
path: ${{ env.PROJECT_DIR }}/build/reports/tests/test
37+
include-hidden-files: true

backend/.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,13 @@ out/
4040
.env
4141

4242
### .idea ###
43-
.idea
43+
.idea
44+
45+
### websocket test ###
46+
src/main/resources/static/ws-test.html
47+
src/main/resources/static/ws-test.js
48+
49+
50+
51+
### images/thumbnail ###
52+
images/thumbnail/**

backend/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM gradle:jdk21 AS builder
2+
WORKDIR /app
3+
COPY . .
4+
RUN ./gradlew clean build -x test
5+
6+
FROM openjdk:21-slim
7+
WORKDIR /app
8+
COPY --from=builder /app/build/libs/*.jar app.jar
9+
ENTRYPOINT ["java", "-jar", "app.jar"]

backend/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ dependencies {
2929
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
3030
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
3131
implementation 'org.springframework.boot:spring-boot-starter-websocket'
32+
implementation 'org.springframework.boot:spring-boot-starter-security'
33+
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
3234

3335
/* DATABASE */
3436
runtimeOnly 'com.mysql:mysql-connector-j'
@@ -38,8 +40,11 @@ dependencies {
3840
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
3941
testImplementation 'org.projectlombok:lombok'
4042
testAnnotationProcessor 'org.projectlombok:lombok'
43+
testRuntimeOnly 'com.h2database:h2'
44+
testImplementation 'org.springframework.security:spring-security-test'
4145

4246
/* ETC */
47+
implementation 'org.apache.commons:commons-lang3:3.12.0'
4348
annotationProcessor 'org.projectlombok:lombok'
4449
compileOnly 'org.projectlombok:lombok'
4550

backend/src/main/java/io/f1/backend/BackendApplication.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
@SpringBootApplication
99
public class BackendApplication {
1010

11-
public static void main(String[] args) {
12-
SpringApplication.run(BackendApplication.class, args);
13-
}
14-
11+
public static void main(String[] args) {
12+
SpringApplication.run(BackendApplication.class, args);
13+
}
1514
}
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
package io.f1.backend.domain.admin.entity;
22

33
import io.f1.backend.global.entity.BaseEntity;
4+
45
import jakarta.persistence.Column;
56
import jakarta.persistence.Entity;
67
import jakarta.persistence.GeneratedValue;
78
import jakarta.persistence.GenerationType;
89
import jakarta.persistence.Id;
10+
911
import java.time.LocalDateTime;
1012

1113
@Entity
1214
public class Admin extends BaseEntity {
1315

14-
@Id
15-
@GeneratedValue(strategy = GenerationType.IDENTITY)
16-
private Long id;
17-
18-
@Column(nullable = false)
19-
private String username;
16+
@Id
17+
@GeneratedValue(strategy = GenerationType.IDENTITY)
18+
private Long id;
2019

21-
@Column(nullable = false)
22-
private String password;
20+
@Column(nullable = false)
21+
private String username;
2322

24-
@Column(nullable = false)
25-
private LocalDateTime lastLogin;
23+
@Column(nullable = false)
24+
private String password;
2625

26+
@Column(nullable = false)
27+
private LocalDateTime lastLogin;
2728
}

backend/src/main/java/io/f1/backend/domain/game/ConnectionState.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

backend/src/main/java/io/f1/backend/domain/game/GameSetting.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)