-
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.
Create separate action to assess code quality (#145)
- Loading branch information
1 parent
5ce31ee
commit 7da4687
Showing
10 changed files
with
368 additions
and
182 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,101 @@ | ||
name: Java Gradle Base | ||
# Reusable workflow for building testing and assessing code quality | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
download-lfs-files: | ||
description: "Whether the Git checkout action should resolve LFS files or not. (Default is false)" | ||
required: false | ||
type: boolean | ||
default: false | ||
gradle-cache: | ||
description: "Whether Gradle caching is enabled or not. (Default is true)" | ||
required: false | ||
type: boolean | ||
default: true | ||
gradle-version: | ||
description: "Gradle version to be installed. (Default is wrapper)" | ||
required: false | ||
type: string | ||
default: "wrapper" | ||
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" | ||
working-directory: | ||
description: "Working directory of your Gradle artifacts. (Default is .)" | ||
required: false | ||
type: string | ||
default: "." | ||
secrets: | ||
signing-key-id: | ||
description: "Key id for signing the Sonatype publication." | ||
required: true | ||
signing-password: | ||
description: "Password for signing the Sonatype publication." | ||
required: true | ||
signing-secret-key-ring: | ||
description: "Key ring (base64 encoded) for signing the Sonatype publication." | ||
required: true | ||
sonar-organization: | ||
description: "Organization for Sonarcloud" | ||
required: true | ||
sonar-token: | ||
description: "Token for Sonarcloud." | ||
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/[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-quality: | ||
name: Asses code quality | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: Assess code quality | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
download-lfs-files: ${{ inputs.download-lfs-files }} | ||
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 }} |
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,44 +69,26 @@ on: | |
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 | ||
build-and-test: | ||
name: Build, Test and Assess code quality | ||
uses: bakdata/ci-templates/.github/workflows/[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 }} | ||
secrets: | ||
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 }} | ||
|
||
steps: | ||
- name: Test | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
sonar-token: ${{ secrets.sonar-token }} | ||
sonar-organization: ${{ secrets.sonar-organization }} | ||
signing-secret-key-ring: ${{ secrets.signing-secret-key-ring }} | ||
signing-key-id: ${{ secrets.signing-key-id }} | ||
signing-password: ${{ secrets.signing-password }} | ||
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 }} | ||
|
||
build-jib: | ||
name: Build tarball image | ||
runs-on: ubuntu-22.04 | ||
needs: test | ||
needs: build-and-test | ||
|
||
steps: | ||
- name: Build tarball image | ||
|
@@ -155,7 +137,7 @@ jobs: | |
name: Create Github release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-22.04 | ||
needs: publish | ||
needs: [publish, publish-jib-image] | ||
|
||
steps: | ||
- name: Release on Github | ||
|
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,44 +59,27 @@ on: | |
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 | ||
build-and-test: | ||
name: Build, Test and Assess code quality | ||
uses: bakdata/ci-templates/.github/workflows/[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 }} | ||
|
||
steps: | ||
- name: Test | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
sonar-token: ${{ secrets.sonar-token }} | ||
sonar-organization: ${{ secrets.sonar-organization }} | ||
signing-secret-key-ring: ${{ secrets.signing-secret-key-ring }} | ||
signing-key-id: ${{ secrets.signing-key-id }} | ||
signing-password: ${{ secrets.signing-password }} | ||
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 }} | ||
secrets: | ||
signing-key-id: ${{ secrets.signing-key-id }} | ||
signing-password: ${{ secrets.signing-password }} | ||
signing-secret-key-ring: ${{ secrets.signing-secret-key-ring }} | ||
sonar-token: ${{ secrets.sonar-token }} | ||
sonar-organization: ${{ secrets.sonar-organization }} | ||
|
||
publish: | ||
name: Publish | ||
runs-on: ubuntu-22.04 | ||
needs: test | ||
needs: build-and-test | ||
|
||
steps: | ||
- name: Publish | ||
|
Oops, something went wrong.