From c9e35994fa482e0f0a92df59e037a83dc8677333 Mon Sep 17 00:00:00 2001 From: yyeeqii Date: Sun, 27 Apr 2025 15:24:24 +0800 Subject: [PATCH] added GitHub Action Ci yaml --- .github/workflows/GitAction_CI.yaml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/GitAction_CI.yaml diff --git a/.github/workflows/GitAction_CI.yaml b/.github/workflows/GitAction_CI.yaml new file mode 100644 index 000000000..d19b1268c --- /dev/null +++ b/.github/workflows/GitAction_CI.yaml @@ -0,0 +1,38 @@ +# .github/workflows/ci-cd.yml +name: CI/CD Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-test-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Grant execute permission for Gradle Wrapper + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew clean build + + - name: Run Tests + run: ./gradlew test + + # Optional: You can add deployment steps here if needed + - name: Deploy (example) + run: | + echo "This is where you'd deploy your JAR."