-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many update based on Micronaut Laumch
- Loading branch information
1 parent
bab04c4
commit 1c2a47d
Showing
14 changed files
with
270 additions
and
134 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 |
---|---|---|
|
@@ -6,11 +6,8 @@ on: | |
pull_request: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
GRADLE_OPTS: "-Dorg.gradle.console=plain" | ||
GRADLE_OPTS: "-Dorg.gradle.console=plain -Dorg.gradle.caching=true -Dkotlin.caching.enabled=true" | ||
|
||
jobs: | ||
compile: | ||
|
@@ -19,11 +16,14 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Liber-UFPE/spring-gradle-build-action@v2 | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Starts Gradle Daemon | ||
run: ./gradlew | ||
with: | ||
# Runs the gradle wrapper step | ||
gradle-wrapper-validation: true | ||
# Allows this job to write to the cache every time it runs | ||
gradle-cache-read-only: false | ||
- run: ./gradlew testClasses | ||
- name: Gradle Tasks Summary | ||
run: cat build/reports/build-times.md >> $GITHUB_STEP_SUMMARY | ||
|
||
detekt: | ||
name: Code Analysis / detekt | ||
|
@@ -33,7 +33,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: detekt report | ||
uses: natiginfo/[email protected].1 | ||
uses: natiginfo/[email protected].3 | ||
with: | ||
args: | | ||
--report md:build/reports/detekt/detekt.md | ||
|
@@ -53,23 +53,6 @@ jobs: | |
- name: run ktlin | ||
run: ktlint --relative >> $GITHUB_STEP_SUMMARY | ||
|
||
accessibility-test: | ||
name: Tests / Accessibility | ||
runs-on: ubuntu-latest | ||
# Since this job is experimental | ||
continue-on-error: true | ||
needs: | ||
- detekt | ||
- ktlint | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Liber-UFPE/spring-gradle-build-action@v2 | ||
- run: ./gradlew accessibilityTestClasses | ||
- name: Run Accessibility Tests | ||
# For some annoying reason, Gradle insists in execute the `test` task | ||
# too. -x removes it from the task graph for this execution. | ||
run: ./gradlew accessibilityTest | ||
|
||
test: | ||
name: Tests / test | ||
runs-on: ubuntu-latest | ||
|
@@ -79,7 +62,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Liber-UFPE/spring-gradle-build-action@v2 | ||
- run: ./gradlew koverHtmlReport -x accessibilityTest | ||
- name: Run tests | ||
run: ./gradlew koverHtmlReport -x accessibilityTest | ||
- name: Gradle Tasks Summary | ||
run: cat build/reports/build-times.md >> $GITHUB_STEP_SUMMARY | ||
- name: Setup Pandoc | ||
uses: r-lib/actions/setup-pandoc@v2 | ||
- name: Output Kover summary | ||
|
@@ -99,14 +85,16 @@ jobs: | |
only-summary: "true" | ||
|
||
build: | ||
name: Package / build | ||
name: Package / shadowJar | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Liber-UFPE/spring-gradle-build-action@v2 | ||
- run: ./gradlew shadowJar | ||
- name: Gradle Tasks Summary | ||
run: cat build/reports/build-times.md >> $GITHUB_STEP_SUMMARY | ||
|
||
build-docker: | ||
name: Package / Docker / build | ||
|
@@ -118,6 +106,26 @@ jobs: | |
- uses: Liber-UFPE/spring-gradle-build-action@v2 | ||
- name: Run dockerBuild | ||
run: ./gradlew dockerBuild | ||
- name: Gradle Tasks Summary | ||
run: cat build/reports/build-times.md >> $GITHUB_STEP_SUMMARY | ||
|
||
build-docker-native: | ||
name: Package / Docker / native | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '21' | ||
distribution: 'graalvm' | ||
cache: 'maven' | ||
- name: Run dockerBuildNative | ||
run: GRAALVM_QUICK_BUILD=true ./gradlew dockerBuildNative | ||
- name: Gradle Tasks Summary | ||
run: cat build/reports/build-times.md >> $GITHUB_STEP_SUMMARY | ||
|
||
check-if-prod: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
|
@@ -150,6 +158,8 @@ jobs: | |
- uses: Liber-UFPE/spring-gradle-build-action@v2 | ||
- name: Create Release Package | ||
run: ./gradlew clean shadowJar | ||
- name: Gradle Tasks Summary | ||
run: cat build/reports/build-times.md >> $GITHUB_STEP_SUMMARY | ||
- name: Create Github Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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,32 @@ | ||
name: 'Gradle Build Action' | ||
description: 'Reusable GitHub Action for performing a gradle build or running a gradle task.' | ||
|
||
inputs: | ||
gradle-cache-disabled: | ||
description: 'Caching is enabled by default. You can disable caching for the action using this parameter' | ||
required: false | ||
default: false | ||
gradle-cache-read-only: | ||
description: 'Configure read-only caching for the gradle-build-action' | ||
required: false | ||
default: ${{ github.ref != 'refs/heads/main' }} | ||
gradle-cache-write-only: | ||
description: 'Configure write-only caching for the gradle-build-action' | ||
required: false | ||
default: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "21" | ||
distribution: "temurin" | ||
- name: Set up Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
generate-job-summary: false | ||
cache-disabled: ${{ inputs.gradle-cache-disabled }} | ||
cache-read-only: ${{ inputs.gradle-cache-read-only }} | ||
cache-write-only: ${{ inputs.gradle-cache-write-only }} |
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 |
---|---|---|
@@ -1,36 +1,29 @@ | ||
Thumbs.db | ||
.DS_Store | ||
.gradle | ||
**/build/ | ||
!src/**/build/ | ||
|
||
bin | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Avoid ignore Gradle wrappper properties | ||
!gradle-wrapper.properties | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
|
||
# Eclipse Gradle plugin generated files | ||
# Eclipse Core | ||
.project | ||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
Thum | ||
bs.db | ||
.DS_Store | ||
build/ | ||
jte-classes | ||
target/ | ||
out/ | ||
|
||
.lighthouseci | ||
.micronaut/ | ||
.vagrant | ||
|
||
.idea | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
.project | ||
.settings | ||
.classpath | ||
.factorypath | ||
|
||
jte-classes | ||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Avoid ignore Gradle wrappper properties | ||
!gradle-wrapper.properties |
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
Oops, something went wrong.