Refactor workflows - user reusable workflows (#2504)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
54
.github/workflows/reusable_workflow_verify.yaml
vendored
Normal file
54
.github/workflows/reusable_workflow_verify.yaml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Verify (Reusable Workflow)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'The branch, tag or SHA to checkout, e.g. master'
|
||||
type: string
|
||||
default: 'master'
|
||||
maven_properties:
|
||||
type: string
|
||||
default: ''
|
||||
description: 'Properties to pass to Maven command line, e.g. -Djpa.vendor=hibernate'
|
||||
|
||||
jobs:
|
||||
reusable_workflow_verify:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
rabbitmq:
|
||||
image: rabbitmq:3-management-alpine
|
||||
env:
|
||||
RABBITMQ_DEFAULT_VHOST: /
|
||||
RABBITMQ_DEFAULT_USER: guest
|
||||
RABBITMQ_DEFAULT_PASS: guest
|
||||
ports:
|
||||
- 15672:15672
|
||||
- 5672:5672
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 21
|
||||
cache: 'maven'
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Check file license headers
|
||||
run: mvn license:check -PcheckLicense --batch-mode
|
||||
|
||||
- name: Run tests & javadoc
|
||||
run: mvn clean verify javadoc:javadoc -PgenerateTestReport ${{ inputs.maven_properties }} --batch-mode
|
||||
Reference in New Issue
Block a user