diff --git a/.github/workflows/aa.yml b/.github/workflows/aa.yml new file mode 100644 index 00000000..a01d0f48 --- /dev/null +++ b/.github/workflows/aa.yml @@ -0,0 +1,65 @@ +# WorkFlow For CI +# Build & Test +# Comment for Fail Test +# Gradle Cache +name: backend test for PR to develop + +on: + pull_request: + branches: ["develop"] + paths: + - "backend/**" + +defaults: + run: + working-directory: backend + +permissions: + contents: read + checks: write + pull-requests: write + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - name: set up Repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: "17" + distribution: "corretto" + + - name: set up TimeZone + run: | + sudo timedatectl set-timezone Asia/Seoul + + - name: Give permission for Gradle + run: chmod +x gradlew + + - name: Cache Gradle + id: cache-gradle + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Build with Gradle + run: ./gradlew build + + - name: Write Test Report + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: "**/build/test-results/test/TEST-*.xml" + + - name: Comment(Annotation) for Failed Test + uses: mikepenz/action-junit-report@v4 + if: always() + with: + report_paths: "**/build/test-results/test/TEST-*.xml"