From a46104caccb6461857c07dd0c8f96a902b582749 Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Wed, 19 Mar 2025 16:32:51 +0300 Subject: [PATCH 1/2] add bages --- .github/workflows/main.yml | 32 ++++++++++++++++---------------- README.md | 10 ++++++---- build.gradle.kts | 4 ++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cf4286b..feac278 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,19 +22,19 @@ jobs: run: ./gradlew build - name: Generate coverage report run: make report - # - name: Cache SonarQube packages - # uses: actions/cache@v4 - # with: - # path: ~/.sonar/cache - # key: ${{ runner.os }}-sonar - # restore-keys: ${{ runner.os }}-sonar - # - name: Cache Gradle packages - # uses: actions/cache@v4 - # with: - # path: ~/.gradle/caches - # key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - # restore-keys: ${{ runner.os }}-gradle - # - name: Build and analyze - # env: - # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - # run: ./gradlew sonar --info + - name: Cache SonarQube packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + - name: Build and analyze + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./gradlew sonar --info diff --git a/README.md b/README.md index 62facd1..00e221a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # java-package ![Java CI](https://github.com/hexlet-boilerplates/java-package/workflows/Java%20CI/badge.svg) -[![Maintainability](https://api.codeclimate.com/v1/badges/bc953fb0ab378995dab3/maintainability)](https://codeclimate.com/github/hexlet-boilerplates/java-package/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/bc953fb0ab378995dab3/test_coverage)](https://codeclimate.com/github/hexlet-boilerplates/java-package/test_coverage) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=bugs)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) +[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) +[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) A project template with only the bare minimum of structure. A good starting point for a small project. @@ -44,9 +47,8 @@ make update ## asdf -On *nix and macOS to manage Java versions we recommend using asdf https://github.com/asdf-vm/asdf. +On *nix and macOS to manage Java versions we recommend using asdf https://github.com/asdf-vm/asdf. - [![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=java-package) This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=java-package). diff --git a/build.gradle.kts b/build.gradle.kts index 4f45c8d..f10138f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,8 +44,8 @@ tasks.jacocoTestReport { reports { xml.required.set(true) } } // Конфигурация плагина org.sonarqube sonar { properties { - property("sonar.projectKey", "hexlet_java-package") - property("sonar.organization", "hexlet") + property("sonar.projectKey", "hexlet-boilerplates_java-package") + property("sonar.organization", "hexlet-boilerplates") property("sonar.host.url", "https://sonarcloud.io") } } From 6de47a817f1edb34ae296bd246883e54c7e29d16 Mon Sep 17 00:00:00 2001 From: Maksim Litvinov Date: Wed, 19 Mar 2025 16:44:44 +0300 Subject: [PATCH 2/2] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00e221a..96e812f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_java-package&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_java-package) -A project template with only the bare minimum of structure. A good starting point for a small project. +A project template with only the bare minimum of structure. A good starting point for a small project. ## Start