Hubobe 46 be 카카오 로그인 #28
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: Test workflows | |
on: | |
pull_request: | |
branches: [ "develop", "main", "hotfix" , "HUBOBE-*" ] | |
types: [ reopened, opened, synchronize ] | |
paths: | |
- 'src/main/java/**' | |
- 'src/test/java/**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout secret code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
token: ${{ secrets.ACTION_SECRETS }} | |
- name: Initialize and update submodules | |
run: | | |
git submodule sync | |
git submodule update --init --recursive | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Copy application.yml files from submodule | |
run: | | |
mkdir -p src/main/resources | |
cp -r BE-hubo-gillajabi-resources/resources/application*.yml src/main/resources/ | |
echo "Copied $(ls -1 src/main/resources/application*.yml | wc -l) application.yml files" | |
- name: Copy resources db files from submodule | |
run: | | |
mkdir -p src/main/resources/db | |
cp -r BE-hubo-gillajabi-resources/resources/db/* src/main/resources/db/ | |
echo "Copied $(ls -1 src/main/resources/db/* | wc -l) db files" | |
- name: Copy test mocked files from submodule | |
run: | | |
mkdir -p src/test/resources | |
cp -r BE-hubo-gillajabi-resources/test/mockedResponses/* src/test/resources/ | |
- name: Gradle Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Test with Gradle | |
run: ./gradlew test -Dspring.profiles.active=test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |