Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Coverage

on:
push:
branches: ["main", "release/**"]
pull_request:
branches: ["main", "release/**"]
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
coverage:
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: gradle

- name: Grant execute permission for Gradle wrapper
run: chmod +x ./gradlew

- name: Run tests + JaCoCo coverage
run: ./gradlew clean coverage --no-daemon

- name: Build coverage summary
id: jacoco
uses: madrapps/jacoco-report@v1.7.2
with:
paths: build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: Code Coverage
min-coverage-overall: 0
min-coverage-changed-files: 0
update-comment: false

- name: Add coverage summary to job output
run: |
echo "### Code Coverage" >> "$GITHUB_STEP_SUMMARY"
echo "- Overall: ${{ steps.jacoco.outputs.coverage-overall }}%" >> "$GITHUB_STEP_SUMMARY"
echo "- Changed files: ${{ steps.jacoco.outputs.coverage-changed-files }}%" >> "$GITHUB_STEP_SUMMARY"

- name: Upload coverage HTML report
uses: actions/upload-artifact@v4
with:
name: jacoco-html-report
path: build/reports/jacoco/test/html/

- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v5
with:
token: ${{ env.CODECOV_TOKEN }}
files: build/reports/jacoco/test/jacocoTestReport.xml
fail_ci_if_error: false

- name: Codecov token missing notice
if: ${{ env.CODECOV_TOKEN == '' }}
run: |
echo "### Codecov upload skipped" >> "$GITHUB_STEP_SUMMARY"
echo "- Missing repository secret: CODECOV_TOKEN" >> "$GITHUB_STEP_SUMMARY"
echo "- Add it in GitHub Settings > Secrets and variables > Actions" >> "$GITHUB_STEP_SUMMARY"

36 changes: 36 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#-------------------------------------------------------------------------------#
# Discover all capabilities of Qodana in our documentation #
# https://www.jetbrains.com/help/qodana/about-qodana.html #
#-------------------------------------------------------------------------------#

name: Qodana

on:
push:
branches: ["main", "release/**"]
workflow_dispatch:
pull_request:
branches:
- main
- release/**

permissions:
contents: read

jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2026.1
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
pr-mode: false
use-caches: true
post-pr-comment: false
use-annotations: false
upload-result: false
push-fixes: 'none'

6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: Test

on:
push:
branches:
- '**'
branches: ["main", "release/**"]
pull_request:
branches:
- '**'
branches: ["main", "release/**"]

jobs:
test:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
![Conformance](https://img.shields.io/badge/Conformance-Check--All%20Passing-brightgreen)

[![Test](https://github.com/jurgenei/gradle-python-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/jurgenei/gradle-python-plugin/actions/workflows/test.yml)
[![Coverage CI](https://github.com/jurgenei/gradle-python-plugin/actions/workflows/coverage.yml/badge.svg)](https://github.com/jurgenei/gradle-python-plugin/actions/workflows/coverage.yml)
[![Coverage](https://codecov.io/gh/jurgenei/gradle-python-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/jurgenei/gradle-python-plugin)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Run Python scripts from Gradle with isolated virtual environments and optional dependency installation.
Expand Down
22 changes: 22 additions & 0 deletions RELEASE_NOTES_NEXT_TAG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# Release Notes (Next Tag)

Date: 2026-05-29
Scope: `gradle-python-plugin` release notes sync for `0.1.1`

## Highlights

- Version line remains on `0.1.1` for the release branch.
- Repository metadata and quality/security configuration remain aligned.

## Notes

- This release-note update is a repository-level sync entry for the release branch.
- No additional release-note-only behavioral deltas are introduced in this file.

## Quality Automation

- Added baseline `qodana.yaml` for JVM community linting on JDK 21.
- Added `.github/workflows/qodana_code_quality.yml` with `main`/`release/**` trigger parity.
- Qodana workflow uses read-only permissions and publishes scan results without auto-fixes.

45 changes: 44 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'java-gradle-plugin'
id 'jacoco'
id 'maven-publish'
id 'signing'
id 'org.owasp.dependencycheck' version '10.0.3'
Expand All @@ -8,7 +9,7 @@ plugins {
}

group = 'name.jurgenei.gradle'
version = '0.1.0'
version = '0.1.1'

repositories {
mavenCentral()
Expand Down Expand Up @@ -127,5 +128,47 @@ tasks.register('allSecurityChecks') {

tasks.withType(Test).configureEach {
useJUnitPlatform()
finalizedBy tasks.named('jacocoTestReport')
}

jacoco {
toolVersion = '0.8.12'
}

tasks.named('jacocoTestReport') {
dependsOn tasks.named('test')
classDirectories.setFrom(sourceSets.main.output.classesDirs)
sourceDirectories.setFrom(sourceSets.main.allSource.srcDirs)
reports {
xml.required = true
html.required = true
csv.required = false
}
}

tasks.named('jacocoTestCoverageVerification') {
dependsOn tasks.named('jacocoTestReport')
classDirectories.setFrom(sourceSets.main.output.classesDirs)
sourceDirectories.setFrom(sourceSets.main.allSource.srcDirs)
violationRules {
rule {
element = 'BUNDLE'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.0
}
}
}
}

tasks.register('coverage') {
group = 'verification'
description = 'Runs tests, generates JaCoCo report, and verifies minimum coverage threshold.'
dependsOn tasks.named('jacocoTestCoverageVerification')
}

tasks.named('check') {
dependsOn tasks.named('jacocoTestCoverageVerification')
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 10 additions & 21 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#

#################################################################################
# WARNING: Do not store sensitive information in this file, #
# as its contents will be included in the Qodana report. #
#################################################################################
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.starter

#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>

#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>

projectJDK: "21" #(Applied in CI/CD pipeline)

#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh

#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

# Quality gate. Will fail the CI/CD pipeline if any condition is not met
# severityThresholds - configures maximum thresholds for different problem severities
# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code
# Code Coverage is available in Ultimate and Ultimate Plus plans
#failureConditions:
# severityThresholds:
# any: 15
# critical: 5
# testCoverageThresholds:
# fresh: 70
# total: 50

#Qodana supports other languages, for example, Python, JavaScript, TypeScript, Go, C#, PHP
#For all supported languages see https://www.jetbrains.com/help/qodana/linters.html
linter: jetbrains/qodana-jvm-community:2026.1

Loading
Loading