Skip to content

Java CI with Maven - Snapshots #1345

Java CI with Maven - Snapshots

Java CI with Maven - Snapshots #1345

# 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.1-SNAPSHOT
- 24.03
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 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