-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.95 KB
/
backend-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
66
67
68
69
# This is a basic workflow to help you get started with Actions
name: Backend-PullRequest-Build-Test
# Controls when the workflow will run
on:
pull_request :
branches:
- "main"
- "feature/**"
- "bugfix/**"
- "refactor/**"
paths:
- "backend/**"
jobs:
# This workflow contains a single job called "build"
test: # The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Start
run: |
echo "\
_____ U ___ u ____ U ___ u _ ____ __ __
|_ \" _| \\/\"_ \/ | _\"\\ \\/\"_ \/U /\"\\ uU | _\"\\ u \\ \\ / /
| | | | | |/| | | | | | | | \\/ _ \\/ \\| |_) |/ \\ V /
/| |\\.-,_| |_| |U| |_| |\\.-,_| |_| | / ___ \\ | _ < U_|\"|_u
u |_|U \\_)-\\___/ |____/ u \\_)-\\___/ /_/ \\_\\ |_| \\_\\ |_|
_// \\\\_ \\\\ |||_ \\\\ \\\\ >> // \\\\_.-,//|(_
(__) (__) (__) (__)_) (__) (__) (__)(__) (__)\_) (__)"
shell: bash
- name: make application-secret.yml
run: |
cd ./backend/src/main/resources
touch ./application-secret.yml
echo "${{ secrets.LOCAL_SECRET_YML }}" > ./application-secret.yml
shell: bash
- name: Grant execute permission for gradlew
run: |
cd ./backend
chmod +x ./gradlew
shell: bash
- name: Grant execute permission for git
run: git config --global --add safe.directory /home/ubuntu/odongdong
- name: Build with Gradle
run: |
cd ./backend
./gradlew clean build -x test
shell: bash
- name: Test with Gradle
run: |
cd ./backend
./gradlew test