From 4f78c72596b422887e751db6015a083833f26b94 Mon Sep 17 00:00:00 2001 From: Ruslan Ibragimov Date: Fri, 2 Feb 2024 00:32:13 +0300 Subject: [PATCH] Add codecov --- .github/workflows/build.yml | 2 +- .github/workflows/code_quality.yml | 24 ++++++++++++++++++++++++ build.gradle.kts | 11 +++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/code_quality.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce225f2..e55d649 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: with: java-version: "21" distribution: "liberica" - - run: ./gradlew check jacocoTestReport distTar + - run: ./gradlew check distTar - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 0000000..f5965d0 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,24 @@ +name: Qodana +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2023.3 + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index 14cf838..c000e8f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -66,3 +66,14 @@ dependencies { testImplementation(libs.junit.jupiter) runtimeOnly(libs.junit.platform.launcher) } + +tasks.jacocoTestReport { + reports { + xml.required = true + csv.required = false + } +} + +tasks.check { + dependsOn(tasks.jacocoTestReport) +}