feature/QFEED-50-Daily-Question (#7) #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-파이프라인 | |
on: | |
push: | |
branches: [develop] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: 빌드 및 분석 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Github Repository 파일 불러오기 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # 모든 커밋 히스토리를 불러옴 | |
- name: JDK 17 설치 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' # Alternative distribution options are available | |
- name: SonarQube Cloud packages 캐싱 | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Gradle packages 캐싱 | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: 빌드 및 분석 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew build sonar --info -x test |