-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (56 loc) · 1.71 KB
/
API-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: API CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- develop
types: [ opened, synchronize, reopened ]
jobs:
build:
name: CI
runs-on: ubuntu-22.04
strategy:
matrix:
kotlin-version: [ "1.9.23" ]
java-version: [ "17" ]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Kotlin
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
kotlin-version: ${{ matrix.kotlin-version }}
distribution: 'corretto'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
# 빌드, ktlint check도 진행됨
- name: Gradle Clean & Build
run: ./gradlew clean :api:build --no-daemon
# # jacoco, sonarcube
# - name: test and analyze
# run: ./gradlew test sonar --stacktrace --no-daemon
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}