Java CI with Maven - Snapshots #1460
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven - Snapshots | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
# Every day at midnight | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
coherenceVersion: | |
- 24.03.2-SNAPSHOT | |
- 24.03.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'zulu' | |
- name: Print Versions | |
run: mvn -version && ant -version | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-snapshots | |
- name: Build and Verify | |
env: | |
COH_VERSION: ${{ matrix.coherenceVersion }} | |
shell: bash | |
run: | | |
echo "Running verify against $COH_VERSION" | |
mvn --file pom.xml -nsu --batch-mode -e -Dcoherence.version=$COH_VERSION -Dpof.maven.plugin.version=24.03.1 clean install | |
echo "==== Testing end-points =====" | |
mvn exec:exec > server.log 2>&1 & | |
PID=$! | |
sleep 30 | |
curl -s http://127.0.0.1:8080/service/chart-data/false | jq | |
curl -s http://127.0.0.1:8080/service/chart-data/true | jq | |
curl -v http://127.0.0.1:8080/service/start-member/1 | |
sleep 10 | |
curl -v http://127.0.0.1:8080/service/stop-member/1 | |
curl -q http://127.0.0.1:8080/service/developer/hostname | |
curl -q http://127.0.0.1:8080/service/developer/populate | |
kill $PID | |
- name: Coherence Demo Jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coherence-demo-jar-${{ matrix.coherenceVersion }} | |
path: target/coherence-demo-*.jar | |
- name: Coherence Demo Javadoc | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coherence-demo-javadoc-${{ matrix.coherenceVersion }} | |
path: target/coherence-demo-*-javadoc.jar |