Skip to content

chore: nginx 도입에 따른 CI/CD 워크플로우 수정 #808

chore: nginx 도입에 따른 CI/CD 워크플로우 수정

chore: nginx 도입에 따른 CI/CD 워크플로우 수정 #808

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