-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.23 KB
/
develop_pull_request.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
name: develop(pull_request) Check Style And Test
on:
pull_request:
branches:
- develop
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'
- name: Start containers # test 돌릴때 레디스 필요
run: docker-compose -f ./docker-compose-test.yaml up -d
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: check
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
- name: SonarCloud scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar --info --stacktrace