build: upgrade to Spring Boot 3 + Java 21 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
workflow_dispatch: | ||
env: | ||
COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | ||
BRANCH: ${{ github.event_name == 'pull_request' && format('refs/heads/{0}', github.event.pull_request.head.ref) || github.ref }} | ||
jobs: | ||
build: | ||
name: Build PinStack API | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 21 for x64 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: maven | ||
- name: Build and test Maven projects | ||
run: | | ||
for project in $(find . -name "pom.xml" -exec dirname {} \;); do | ||
echo "Building and testing project in folder: $project" | ||
(cd "$project" && mvn --batch-mode --update-snapshots clean verify) | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to build or test project in folder: $project" | ||
exit 1 | ||
fi | ||
done |