mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-22 11:21:12 +00:00
38 lines
744 B
YAML
38 lines
744 B
YAML
# .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."
|