mirror of
https://github.com/valitydev/java-workflow.git
synced 2024-11-06 09:35:18 +00:00
02f0c461ae
return test coverate action on service deploy bump codecov
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Maven Build Artifact
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
java-version:
|
|
description: 'Java version'
|
|
required: false
|
|
default: "15"
|
|
type: string
|
|
java-distribution:
|
|
description: 'Java distribution'
|
|
required: false
|
|
default: "adopt"
|
|
type: string
|
|
mvn-args:
|
|
description: 'Additional maven args'
|
|
required: false
|
|
type: string
|
|
ignore-coverage:
|
|
description: 'Ignore test coverage step'
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Build Java
|
|
uses: valitydev/action-jdk-build@v0.0.8
|
|
with:
|
|
jdk-version: ${{ inputs.java-version }}
|
|
jdk-distribution: ${{ inputs.java-distribution }}
|
|
mvn-args: ${{ inputs.mvn-args }}
|
|
|
|
test-coverage:
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ !inputs.ignore-coverage }}
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Build Java
|
|
uses: valitydev/action-jdk-build@v0.0.8
|
|
with:
|
|
jdk-version: ${{ inputs.java-version }}
|
|
jdk-distribution: ${{ inputs.java-distribution }}
|
|
mvn-args: ${{ inputs.mvn-args }}
|
|
|
|
- name: Upload code coverage
|
|
uses: codecov/codecov-action@v2 |