-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.87 KB
/
ci.yml
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
name: CI
on:
pull_request:
branches: ["develop"]
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'adopt'
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set environment variables
env:
KAKAO_ADMIN_KEY: ${{ secrets.KAKAO_ADMIN_KEY }}
JWT_ACCESS_TOKEN_SECRET: ${{ secrets.JWT_ACCESS_TOKEN_SECRET }}
JWT_REFRESH_TOKEN_SECRET: ${{ secrets.JWT_REFRESH_TOKEN_SECRET }}
STORAGE_DATABASE_CORE_DB_URL: ${{ secrets.STORAGE_DATABASE_CORE_DB_URL }}
STORAGE_DATABASE_CORE_DB_USERNAME: ${{ secrets.STORAGE_DATABASE_CORE_DB_USERNAME }}
STORAGE_DATABASE_CORE_DB_PASSWORD: ${{ secrets.STORAGE_DATABASE_CORE_DB_PASSWORD }}
AWS_IOT_ENDPOINT: ${{ secrets.AWS_IOT_ENDPOINT }}
AWS_IOT_CLIENTID: ${{ secrets.AWS_IOT_CLIENTID }}
AWS_IOT_CERTIFICATE: ${{ secrets.AWS_IOT_CERTIFICATE }}
AWS_IOT_PRIVATE_KEY: ${{ secrets.AWS_IOT_PRIVATE_KEY }}
run: echo "Environment variables are set"
- name: Lint
uses: gradle/gradle-build-action@v2
with:
arguments: ktlintCheck
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: test
- name: Gradlew 권한 설정
run: chmod +x ./gradlew
- name: Build Application
run: ./gradlew build
- name: List build directory
run: ls -al build/libs