-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (56 loc) · 1.77 KB
/
Copy pathdevelop-ci.yml
File metadata and controls
67 lines (56 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Backend CI
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: team4
MYSQL_USER: team4
MYSQL_PASSWORD: 1234
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping -h 127.0.0.1" --health-interval=10s --health-timeout=5s --health-retries=5
env:
DB_URL: jdbc:mysql://127.0.0.1:3306/team4
DB_USERNAME: team4
DB_PASSWORD: 1234
NAVER_API_CLIENT_ID: ${{ secrets.NAVER_API_CLIENT_ID }}
NAVER_API_CLIENT_SECRET: ${{ secrets.NAVER_API_CLIENT_SECRET }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
SPRING_PROFILES_ACTIVE: prod # Specify the active profile for production
steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4
# Set up JDK 21 for the project
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
# Grant execute permission for Gradle wrapper
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Validate Gradle wrapper version
- name: Validate Gradle Wrapper
run: ./gradlew --version
# Install dependencies using Gradle
- name: Install Dependencies
run: ./gradlew dependencies --no-daemon
# Build the project using Gradle without daemon
- name: Build with Gradle
run: ./gradlew build --no-daemon
# Run tests to check the validity of the code
- name: Run Tests
run: ./gradlew test --no-daemon