Skip to content

[chore] 워크플로우 테스트 1차 #7

[chore] 워크플로우 테스트 1차

[chore] 워크플로우 테스트 1차 #7

Workflow file for this run

name: Java CI with Gradle
on:
pull_request_target:
types: [opened, reopened, synchronize, labeled]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
if: |
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize') &&
contains(github.event.pull_request.labels.*.name, 'CI') &&
github.event.pull_request.base.ref == 'main'
services:
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Set test yml
uses: microsoft/variable-substitution@v1
with:
files: ./src/test/resources/application.yml
env:
spring.security.jwt.secret: ${{ secrets.JWT_SECRET_KEY }}
spring.data.mongodb.uri: ${{ secrets.MONGO_TEST_URI }}
custom.domain.image.baseUrl: ${{ secrets.BASE_URL }}
cloud.aws.s3.bucket: ${{ secrets.S3_BUCKET_NAME }}
cloud.aws.region.static: ${{ secrets.S3_REGION }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_ACCESS_SECRET }}
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
- name: Test with Gradle
run: ./gradlew test