From 33481c4583416de4d80a079f52ec1da6e6b08547 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 5 Apr 2026 10:24:05 +0530 Subject: [PATCH 01/10] Added matrix --- .github/workflows/matrix.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/matrix.yaml diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml new file mode 100644 index 0000000..8d0bd90 --- /dev/null +++ b/.github/workflows/matrix.yaml @@ -0,0 +1,27 @@ +--- + +name: manual-workflow + +on: + workflow_dispatch: + + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + java-version: [17,21] + steps: + - name: get the code + uses: actions/checkout@v6 + - name: setup Java + uses: actions/setup-java@5 + with: + java-version: ${{ matrix.java-version }} + distribution: temurin + - name: check the java version + run: java -version + - name: package the code + run: mvn --batch-mode -Dmaven.test.failure.ignore=true test From 090f2abadc65bd0cc179d181ab08e6afad179cdd Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 5 Apr 2026 10:24:50 +0530 Subject: [PATCH 02/10] Added matrix workflow --- .github/workflows/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 8d0bd90..dc4134e 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -1,6 +1,6 @@ --- -name: manual-workflow +name: matrix-workflow on: workflow_dispatch: From 02fa91bbd3fc1902797b33c8c44380fa06d84fc8 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 5 Apr 2026 10:25:59 +0530 Subject: [PATCH 03/10] Added setup fix --- .github/workflows/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index dc4134e..336412a 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -17,7 +17,7 @@ jobs: - name: get the code uses: actions/checkout@v6 - name: setup Java - uses: actions/setup-java@5 + uses: actions/setup-java@4 with: java-version: ${{ matrix.java-version }} distribution: temurin From fb330aaca3add07def11f38723b5577708ac1581 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 5 Apr 2026 10:27:19 +0530 Subject: [PATCH 04/10] added fix --- .github/workflows/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 336412a..18be761 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -17,7 +17,7 @@ jobs: - name: get the code uses: actions/checkout@v6 - name: setup Java - uses: actions/setup-java@4 + uses: actions/setup-java@v5 with: java-version: ${{ matrix.java-version }} distribution: temurin From b9cca97c51a648356f489a75723417bfb4b917c4 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 5 Apr 2026 10:29:53 +0530 Subject: [PATCH 05/10] Added distribtuin --- .github/workflows/matrix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 18be761..8db628f 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -13,6 +13,7 @@ jobs: fail-fast: true matrix: java-version: [17,21] + distribution: ['temurin', 'corretto', 'microsoft'] steps: - name: get the code uses: actions/checkout@v6 From 483f994e0f47377ebb8e0d0cee2ea23d2d19c9e6 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sun, 5 Apr 2026 10:33:44 +0530 Subject: [PATCH 06/10] Added multipel runners --- .github/workflows/matrix.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml index 8db628f..435e5d5 100644 --- a/.github/workflows/matrix.yaml +++ b/.github/workflows/matrix.yaml @@ -8,12 +8,13 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: java-version: [17,21] distribution: ['temurin', 'corretto', 'microsoft'] + os: ['ubuntu-24.04', 'ubuntu-22.04', 'ubuntu-22.04-arm', 'ubuntu-24.04-arm'] steps: - name: get the code uses: actions/checkout@v6 From 41cb49464e40a8292ec64f9fca7d2ce8692656e4 Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sat, 11 Apr 2026 10:52:11 +0530 Subject: [PATCH 07/10] Update pom.xml --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 45bc48d..7375c50 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,9 @@ 1.0-SNAPSHOT my-java-app http://maven.apache.org + + dummyrepos + junit From 5123f9d9e261def0d896f7d835f8dbd10f971ddc Mon Sep 17 00:00:00 2001 From: shaikkhajaibrahim Date: Sat, 11 Apr 2026 10:53:01 +0530 Subject: [PATCH 08/10] Create sonar.yaml --- .github/workflows/sonar.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/sonar.yaml diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml new file mode 100644 index 0000000..753f24a --- /dev/null +++ b/.github/workflows/sonar.yaml @@ -0,0 +1,32 @@ +name: SonarQube +on: + workflow_dispatch: +jobs: + build: + name: Build and analyze + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: 'zulu' # Alternative distribution options are available. + - name: Cache SonarQube packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=dummyrepos_my-java-app From 9681ec99d6def78902590565a78161c55c80c0f6 Mon Sep 17 00:00:00 2001 From: muralikoduri21 Date: Mon, 4 May 2026 22:41:05 +0530 Subject: [PATCH 09/10] added build --- .github/workflows/demo.yml | 14 ++++++++++++++ .github/workflows/manual.yaml | 35 ----------------------------------- .github/workflows/matrix.yaml | 29 ----------------------------- .github/workflows/pr.yaml | 28 ---------------------------- .github/workflows/sonar.yaml | 32 -------------------------------- 5 files changed, 14 insertions(+), 124 deletions(-) create mode 100644 .github/workflows/demo.yml delete mode 100644 .github/workflows/manual.yaml delete mode 100644 .github/workflows/matrix.yaml delete mode 100644 .github/workflows/pr.yaml delete mode 100644 .github/workflows/sonar.yaml diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 0000000..4d77eb4 --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,14 @@ +name: maven pipeline + +on: + pull_request: + branches: + - dev +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: get the code + uses: actions/checkout@v4 + - name: packing + run: mvn package \ No newline at end of file diff --git a/.github/workflows/manual.yaml b/.github/workflows/manual.yaml deleted file mode 100644 index 9827cb3..0000000 --- a/.github/workflows/manual.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- - -name: manual-workflow - -on: - workflow_dispatch: - - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: print context info - run: | - echo "${{ toJson(github) }}" - echo "${{ toJson(vars) }}" - if: github.ref == 'refs/heads/main' - - - name: get the code - uses: actions/checkout@v6 - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: java - if: github.ref != 'refs/heads/main' - - name: package the code - run: mvn --batch-mode -Dmaven.test.failure.ignore=true test - - name: Perform code quality analysis - uses: github/codeql-action/analyze@v4 - if: github.ref != 'refs/heads/main' - - name: publish test results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - files: "**/target/surefire-reports/**/*.xml" - comment_mode: always \ No newline at end of file diff --git a/.github/workflows/matrix.yaml b/.github/workflows/matrix.yaml deleted file mode 100644 index 435e5d5..0000000 --- a/.github/workflows/matrix.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- - -name: matrix-workflow - -on: - workflow_dispatch: - - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - java-version: [17,21] - distribution: ['temurin', 'corretto', 'microsoft'] - os: ['ubuntu-24.04', 'ubuntu-22.04', 'ubuntu-22.04-arm', 'ubuntu-24.04-arm'] - steps: - - name: get the code - uses: actions/checkout@v6 - - name: setup Java - uses: actions/setup-java@v5 - with: - java-version: ${{ matrix.java-version }} - distribution: temurin - - name: check the java version - run: java -version - - name: package the code - run: mvn --batch-mode -Dmaven.test.failure.ignore=true test diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml deleted file mode 100644 index 254cbd5..0000000 --- a/.github/workflows/pr.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- - -name: pull-request-workflow - -on: - pull_request: - branches: - - dev - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: get the code - uses: actions/checkout@v6 - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: java - - name: package the code - run: mvn --batch-mode -Dmaven.test.failure.ignore=true test - - name: Perform code quality analysis - uses: github/codeql-action/analyze@v4 - - name: publish test results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - files: "**/target/surefire-reports/**/*.xml" - comment_mode: always \ No newline at end of file diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml deleted file mode 100644 index 753f24a..0000000 --- a/.github/workflows/sonar.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: SonarQube -on: - workflow_dispatch: -jobs: - build: - name: Build and analyze - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: 21 - distribution: 'zulu' # Alternative distribution options are available. - - name: Cache SonarQube packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=dummyrepos_my-java-app From c667c5c0c195c4730ec616f801cb26a0cc62f921 Mon Sep 17 00:00:00 2001 From: muralikoduri21 Date: Mon, 4 May 2026 22:47:48 +0530 Subject: [PATCH 10/10] fetaure --- src/main/java/com/example/App.java | 2 +- src/test/java/com/example/AppTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/App.java b/src/main/java/com/example/App.java index 4d6bcd0..1827cc4 100644 --- a/src/main/java/com/example/App.java +++ b/src/main/java/com/example/App.java @@ -9,6 +9,6 @@ public class App public static void main( String[] args ) { System.out.println("Hello World!"); - System.out.println( "Hello World!" ); + System.out.println( "welcome to git" ); } } diff --git a/src/test/java/com/example/AppTest.java b/src/test/java/com/example/AppTest.java index e85c480..d47a507 100644 --- a/src/test/java/com/example/AppTest.java +++ b/src/test/java/com/example/AppTest.java @@ -41,6 +41,6 @@ public void testApp() */ public void testAppOther() { - assertTrue( true ); + assertTrue( false ); } }