Skip to content

Merge pull request #12 from maddingo/feature/actuator-buildinfo #62

Merge pull request #12 from maddingo/feature/actuator-buildinfo

Merge pull request #12 from maddingo/feature/actuator-buildinfo #62

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for the sake of the integration test
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: cache maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Verify
run: mvn -B clean verify -pl plantuml-web -am -Dgroups="smoke"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JUnit Tests # Name of the check run which will be created
path: '*/target/surefire-reports/TEST-*.xml' # Path to test results
reporter: java-junit # Format of test results
deployment:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
environment: Docker Hub
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for the sake of the integration test
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: cache maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Deploy
run: mvn -B clean deploy
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JUnit Tests # Name of the check run which will be created
path: '*/target/surefire-reports/TEST-*.xml' # Path to test results
reporter: java-junit # Format of test results