-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (38 loc) · 939 Bytes
/
_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Test app
on:
workflow_call:
inputs:
working-directory:
type: string
default: .
required: false
description: Working directory
module:
type: string
default: .
required: false
description: Maven module
maven-profiles:
type: string
default: default
required: false
description: Comma-separated Maven profiles
env:
JAVA_VERSION: 17
jobs:
test-app:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-java@v3
with:
distribution: liberica
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Test app
run: ./mvnw -ntp -B -pl ${{ inputs.module }} test -P ${{ inputs.maven-profiles }}