From c9c27ce2ee235377c5b56556de5ae89e04e33c1f Mon Sep 17 00:00:00 2001 From: Anton Kurako Date: Mon, 23 Sep 2024 11:39:26 +0300 Subject: [PATCH] CI Fix --- .github/workflows/test-master.yml | 27 +++++++++++++++++++ .github/workflows/test-pr.yml | 40 +++++++++++++++++++++++++++++ README.md | 2 ++ src/main/resources/application.conf | 2 +- 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-master.yml create mode 100644 .github/workflows/test-pr.yml diff --git a/.github/workflows/test-master.yml b/.github/workflows/test-master.yml new file mode 100644 index 0000000..4b17b0d --- /dev/null +++ b/.github/workflows/test-master.yml @@ -0,0 +1,27 @@ +name: Build Master + +on: + push: + branches: + - "master" + +jobs: + test: + runs-on: ubuntu-latest + name: Running tests + steps: + - uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: "21" + distribution: "adopt" + + - name: Build classes + run: "./gradlew classes" + + - name: Build tests + run: "./gradlew testClasses" + + - name: Run tests + run: "./gradlew test jacocoTestReport --no-parallel" diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 0000000..620337a --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,40 @@ +name: Test PR + +on: + pull_request: + branches: + - "master" + + +permissions: + contents: read + checks: write + pull-requests: write + + +jobs: + build-tests: + runs-on: ubuntu-latest + name: Pull Request Java ${{ matrix.java }} + steps: + - uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: "21" + distribution: "adopt" + + - name: Build classes + run: "./gradlew classes" + + - name: Build tests + run: "./gradlew testClasses" + + - name: Run tests + run: "./gradlew test jacocoTestReport" + + - name: Report tests + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: | + **/test-results/**/*.xml diff --git a/README.md b/README.md index f2933e3..d828b5c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![GitHub Action](https://github.com/kora-projects/kora-java-crud-template/workflows/Build%20Master/badge.svg)](https://github.com/kora-projects/kora-java-crud-template/actions?query=workflow%3A%22Build%20Master%22++) + # Шаблон приложения Kora Java CRUD Пример сервиса реализованного на Kora с HTTP [CRUD](https://github.com/swagger-api/swagger-petstore) API, diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index caa4347..d7a0744 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -55,5 +55,5 @@ resilient { logging.level { "root": "WARN" "ru.tinkoff.kora": "INFO" - "ru.tinkoff.kora.crud": "INFO" + "ru.tinkoff.kora.java.crud": "INFO" }