[FEAT] redis를 통한 lock 적용과 api 캐싱 및 test container 적용 #406
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: TWTW Backend CI | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- '**.java' | |
pull_request: | |
paths: | |
- '**.java' | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./backend | |
jobs: | |
backend-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
architecture: x64 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Apply Environment Variables | |
run: | | |
mkdir -p src/test/resources | |
mkdir -p src/main/resources | |
echo "${{ secrets.ENVIRONMENT_YML }}" > src/test/resources/application-env.yml | |
echo "${{ secrets.ENVIRONMENT_YML }}" > src/main/resources/application-env.yml | |
echo "${{ secrets.FIREBASE_JSON }}" > src/test/resources/twtw_firebase_key.json | |
echo "${{ secrets.FIREBASE_JSON }}" > src/main/resources/twtw_firebase_key.json | |
echo "${{ secrets.STORAGE_JSON }}" > src/test/resources/engaged-shade-405207-b8ba9bb8a30f.json | |
echo "${{ secrets.STORAGE_JSON }}" > src/main/resources/engaged-shade-405207-b8ba9bb8a30f.json | |
- run: chmod +x gradlew | |
- run: ./gradlew build | |
- run: ./gradlew jib | |
- name: Test Coverage Report | |
id: jacoco | |
uses: madrapps/[email protected] | |
with: | |
paths: ${{ github.workspace }}/backend/build/reports/jacoco/test/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: "test coverage" | |
min-coverage-overall: 50 | |
min-coverage-changed-files: 50 |