Skip to content

Commit

Permalink
Add actions for maven builds
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Sep 19, 2023
1 parent f2bf20e commit c7f5f5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion actions/java-maven-build/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# java-maven-build

This action builds Java artifacts using Maven and uploads `.jar` files as an artifact.
This action builds Java artifacts using Maven.

## Input Parameters

Expand Down
4 changes: 1 addition & 3 deletions actions/java-maven-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ This action runs Junit tests.

## Input Parameters

If you do not set input parameters for publishing code quality test results on Sonarcloud or for testing the signing for
Sonatype, then these steps are skipped.

| Name | Required | Default Value | Type | Description |
| ------------------ | :------: | :-----------: | :-----: | -------------------------------------------------------------------------------------------------- |
| java-distribution || microsoft | string | [Java distribution](https://github.com/actions/setup-java#supported-distributions) to be installed |
| java-version || 11 | string | Java version to be installed |
| working-directory || "." | string | Working directory of your Maven artifacts |
| download-lfs-files || false | boolean | Whether the Git checkout action should resolve LFS files or not |
| test-command || test | string | Command to run tests with |

## Usage

Expand Down
8 changes: 6 additions & 2 deletions actions/java-maven-test/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Test Java artifacts"
description: "Run Junit test, publish test results and optionally test signing for Sonatype"
description: "Run Junit test"

inputs:
java-distribution:
Expand All @@ -18,6 +18,10 @@ inputs:
description: "Whether the Git checkout action should resolve LFS files or not. (Default is false)"
required: false
default: false
test-command:
description: "Command to run tests with. (Default is test)"
required: false
default: "test"

runs:
using: "composite"
Expand All @@ -35,6 +39,6 @@ runs:
java-version: ${{ inputs.java-version }}

- name: Run tests
run: mvn test
run: mvn ${{ inputs.test-command }}
shell: bash
working-directory: ${{ inputs.working-directory }}

0 comments on commit c7f5f5c

Please sign in to comment.