-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Group build, test and asses in one workflow
- Loading branch information
1 parent
180e9d3
commit 777df37
Showing
5 changed files
with
204 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Java Gradle Base | ||
# Reusable workflow for building testing and assessing code quality | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
java-distribution: | ||
description: "Java distribution to be installed. (Default is microsoft)" | ||
required: false | ||
type: string | ||
default: "microsoft" | ||
java-version: | ||
description: "Java version to be installed. (Default is 11)" | ||
required: false | ||
type: string | ||
default: "11" | ||
gradle-version: | ||
description: "Gradle version to be installed. (Default is wrapper)" | ||
required: false | ||
type: string | ||
default: "wrapper" | ||
gradle-cache: | ||
description: "Whether Gradle caching is enabled or not. (Default is true)" | ||
required: false | ||
type: boolean | ||
default: true | ||
working-directory: | ||
description: "Working directory of your Gradle artifacts. (Default is .)" | ||
required: false | ||
type: string | ||
default: "." | ||
download-lfs-files: | ||
description: "Whether the Git checkout action should resolve LFS files or not. (Default is false)" | ||
required: false | ||
type: string | ||
default: false | ||
secrets: | ||
sonar-token: | ||
description: "Token for Sonarcloud." | ||
required: true | ||
sonar-organization: | ||
description: "Organization for Sonarcloud" | ||
required: true | ||
signing-secret-key-ring: | ||
description: "Key ring (base64 encoded) for signing the Sonatype publication." | ||
required: true | ||
signing-key-id: | ||
description: "Key id for signing the Sonatype publication." | ||
required: true | ||
signing-password: | ||
description: "Password for signing the Sonatype publication." | ||
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Build | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: Run unit tests | ||
uses: bakdata/ci-templates/actions/java-gradle-test@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
assess-code: | ||
name: Asses code quality | ||
runs-on: ubuntu-22.04 | ||
needs: test | ||
steps: | ||
- name: Assess code quality | ||
uses: bakdata/ci-templates/actions/java-gradle-assess-code-quality@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
signing-key-id: ${{ secrets.signing-key-id }} | ||
signing-password: ${{ secrets.signing-password }} | ||
signing-secret-key-ring: ${{ secrets.signing-secret-key-ring }} | ||
sonar-organization: ${{ secrets.sonar-organization }} | ||
sonar-token: ${{ secrets.sonar-token }} | ||
working-directory: ${{ inputs.working-directory }} | ||
download-lfs-files: ${{ inputs.download-lfs-files }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,59 +69,31 @@ on: | |
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
java-gradle-base: | ||
name: Build, Test and Assess code quality | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Build | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
- name: Build, Test & Assess | ||
uses: bakdata/ci-templates/actions/java-gradle-base@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
|
||
with: | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: Run unit tests | ||
uses: bakdata/ci-templates/actions/java-gradle-test@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
assess-code: | ||
name: Asses code quality | ||
runs-on: ubuntu-22.04 | ||
needs: test | ||
steps: | ||
- name: Assess code quality | ||
uses: bakdata/ci-templates/actions/java-gradle-assess-code-quality@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
signing-key-id: ${{ secrets.signing-key-id }} | ||
signing-password: ${{ secrets.signing-password }} | ||
signing-secret-key-ring: ${{ secrets.signing-secret-key-ring }} | ||
sonar-organization: ${{ secrets.sonar-organization }} | ||
sonar-token: ${{ secrets.sonar-token }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
build-jib: | ||
name: Build tarball image | ||
runs-on: ubuntu-22.04 | ||
needs: assess-code | ||
needs: java-gradle-base | ||
|
||
steps: | ||
- name: Build tarball image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,59 +59,31 @@ on: | |
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
java-gradle-base: | ||
name: Build, Test and Assess code quality | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Build | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
- name: Build, Test & Assess | ||
uses: bakdata/ci-templates/actions/java-gradle-base@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
|
||
with: | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: Run unit tests | ||
uses: bakdata/ci-templates/actions/java-gradle-test@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
assess-code: | ||
name: Asses code quality | ||
runs-on: ubuntu-22.04 | ||
needs: test | ||
steps: | ||
- name: Assess code quality | ||
uses: bakdata/ci-templates/actions/java-gradle-assess-code-quality@feat/split-test | ||
# uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
gradle-cache: ${{ inputs.gradle-cache }} | ||
gradle-version: ${{ inputs.gradle-version }} | ||
java-distribution: ${{ inputs.java-distribution }} | ||
java-version: ${{ inputs.java-version }} | ||
signing-key-id: ${{ secrets.signing-key-id }} | ||
signing-password: ${{ secrets.signing-password }} | ||
signing-secret-key-ring: ${{ secrets.signing-secret-key-ring }} | ||
sonar-organization: ${{ secrets.sonar-organization }} | ||
sonar-token: ${{ secrets.sonar-token }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
publish: | ||
name: Publish | ||
runs-on: ubuntu-22.04 | ||
needs: assess-code | ||
needs: java-gradle-base | ||
|
||
steps: | ||
- name: Publish | ||
|
Oops, something went wrong.