diff --git a/.github/workflows/auto-unit-test.yml b/.github/workflows/auto-unit-test.yml new file mode 100644 index 000000000..c472e7729 --- /dev/null +++ b/.github/workflows/auto-unit-test.yml @@ -0,0 +1,35 @@ +name: Auto Unit Test + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + # JDK 17 설치 + - name: set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + cache: gradle + + # local.properties 생성 + - name: Create local.properties + env: + PROPERTIES: ${{ secrets.PROPERTIES }} + run: echo $PROPERTIES | base64 -di > ./local.properties + + # Gradle 에 실행 권한 부여 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + # Unit Test 실행 + - name: Run Unit Tests + run: ./gradlew test --no-daemon --parallel