[test] 카프카 테스트 추가 #1
Workflow file for this run
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: Java CI with Gradle | |
on: | |
pull_request_target: | |
types: [opened, reopened, synchronize, labeled] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
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' | |
runs-on: ubuntu-latest | |
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: Docker Compose For Test | |
run: | | |
touch docker-compose.yml | |
echo "${{ secrets.CI_DOCKER_COMPOSE }}" > docker-compose.yml | |
echo docker-compose.yml | |
docker-compose up -d | |
- name: Test with Gradle | |
run: ./gradlew test |