Skip to content

CI/CD 파이프라인 작성 #1

CI/CD 파이프라인 작성

CI/CD 파이프라인 작성 #1

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches: [ "dev" ]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: false
permissions:
contents: read
jobs:
testing:
runs-on: ubuntu-20.04
steps:
# 1. Compare branch 코드 내려 받기
- name: Checkout PR
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
# 2. 자바 환경 설정
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# 3. AWS configure 설정
- uses: actions/checkout@v2
- 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 }}
# 3. Gradle Test 실행
- name: Test with Gradle
run: |
chmod +x ./gradlew
./gradlew --info --parallel test