This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/phoenix-adapters.git


The following commit(s) were added to refs/heads/main by this push:
     new ed06a27  PHOENIX-7736 Setup github workflow for Phoenix Adapters (#1)
ed06a27 is described below

commit ed06a27298bcd50e049a5654d83f49b94a3ec862
Author: Viraj Jasani <[email protected]>
AuthorDate: Tue Nov 25 16:05:05 2025 +0530

    PHOENIX-7736 Setup github workflow for Phoenix Adapters (#1)
---
 .github/workflows/ci.yml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..56c938c
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,96 @@
+name: CI Build and Test
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+  build-and-test:
+    runs-on: ubuntu-latest
+    
+    # Increase timeout for long-running test suites
+    #timeout-minutes: 60
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v4
+      with:
+        fetch-depth: 0
+
+    - name: Set up JDK 8
+      uses: actions/setup-java@v4
+      with:
+        java-version: '8'
+        distribution: 'temurin'
+        cache: 'maven'
+
+    - name: Cache Maven dependencies
+      uses: actions/cache@v4
+      with:
+        path: ~/.m2/repository
+        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+        restore-keys: |
+          ${{ runner.os }}-maven-
+
+    - name: Configure Maven
+      run: |
+        # Create Maven options file to set memory limits for builds
+        mkdir -p .mvn
+        echo "-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC" > 
.mvn/jvm.config
+        
+        # Set MAVEN_OPTS as backup
+        echo "MAVEN_OPTS=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC" 
>> $GITHUB_ENV
+
+    - name: Build with Maven (skip tests)
+      run: mvn clean install -DskipTests -B -V
+      env:
+        MAVEN_OPTS: "-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC"
+
+    - name: Run tests with Maven
+      run: mvn clean verify -B -V
+      env:
+        MAVEN_OPTS: "-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC"
+
+    - name: Upload Test Results
+      if: always()
+      uses: actions/upload-artifact@v4
+      with:
+        name: test-results
+        path: |
+          **/target/surefire-reports/*.xml
+          **/target/surefire-reports/*.txt
+          **/target/failsafe-reports/*.xml
+          **/target/failsafe-reports/*.txt
+        retention-days: 5
+
+    - name: Upload Test Logs
+      if: failure()
+      uses: actions/upload-artifact@v4
+      with:
+        name: test-logs
+        path: |
+          **/target/surefire-reports/*.txt
+          **/target/failsafe-reports/*.txt
+          **/logs/*.log
+        retention-days: 5
+
+    - name: Publish Test Report
+      if: failure()
+      uses: mikepenz/action-junit-report@v4
+      env:
+        NODE_OPTIONS: '--max-old-space-size=12288'
+      with:
+        report_paths: '**/target/*-reports/TEST-*.xml'
+        check_name: Test Results
+        fail_on_failure: true
+        require_tests: true
+
+    - name: Upload Build Artifacts
+      if: success()
+      uses: actions/upload-artifact@v4
+      with:
+        name: build-artifacts
+        path: |
+          phoenix-ddb-assembly/target/*.tar.gz
+        retention-days: 5

Reply via email to