java-workflow/.github/workflows/maven-service-build.yml
vitaxa 02f0c461ae
return test coverage on service deploy (#14)
return test coverate action on service deploy

bump codecov
2022-03-01 16:18:33 +03:00

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