mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
added GitHub Action Ci yaml
This commit is contained in:
parent
2621e1725c
commit
c9e35994fa
1 changed files with 38 additions and 0 deletions
38
.github/workflows/GitAction_CI.yaml
vendored
Normal file
38
.github/workflows/GitAction_CI.yaml
vendored
Normal file
|
@ -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."
|
Loading…
Reference in a new issue