diff --git a/.github/workflows/be-dev-ci-cd.yml b/.github/workflows/be-cd-dev.yml similarity index 98% rename from .github/workflows/be-dev-ci-cd.yml rename to .github/workflows/be-cd-dev.yml index 0662ccfb..8a8bd27f 100644 --- a/.github/workflows/be-dev-ci-cd.yml +++ b/.github/workflows/be-cd-dev.yml @@ -1,4 +1,4 @@ -name: BE DEV CI/CD +name: BE CD DEV on: push: diff --git a/.github/workflows/be-ci.yml b/.github/workflows/be-ci.yml new file mode 100644 index 00000000..05ac48a5 --- /dev/null +++ b/.github/workflows/be-ci.yml @@ -0,0 +1,41 @@ +name: BE CI + +on: + pull_request: + branches: [ production/be, develop/be ] + +jobs: + build: + runs-on: ubuntu-latest + + defaults: + run: + shell: bash + working-directory: ./backend + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Test with Gradle + run: ./gradlew build + + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + if: ${{ always() }} + with: + files: ./build/test-results/**/*.xml + + - name: When test fail, comment on that code + uses: mikepenz/action-junit-report@v3 + if: always() + with: + report_paths: ./build/test-results/**/*.xml + token: ${{ github.token }}