-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): Update Build and CI (#1005)
- Use version catalogs - Cleanup and update Github workflows - Cleanup test apps - Cleanup unused dependencies - Update dependencies - Set correct/minimal dependency configuration scopes - Remove unused imports - Move docs dropdown version list to gradle.properties
- Loading branch information
Showing
88 changed files
with
996 additions
and
12,176 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 |
---|---|---|
|
@@ -9,135 +9,92 @@ on: | |
- '[4-9]+.[0-9]+.x' | ||
- '[3-9]+.[3-9]+.x' | ||
workflow_dispatch: | ||
env: | ||
GIT_USER_NAME: puneetbehl | ||
GIT_USER_EMAIL: [email protected] | ||
|
||
jobs: | ||
core-tests: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11.0.6' | ||
- uses: gradle/wrapper-validation-action@v2 | ||
- uses: actions/setup-java@v4 | ||
with: { java-version: 11, distribution: temurin } | ||
- name: Run Tests | ||
if: github.event_name == 'pull_request' | ||
id: tests | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/actions/setup-gradle@v3 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
with: | ||
arguments: | | ||
check | ||
-Dgeb.env=chromeHeadless | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Publish Test Report | ||
if: steps.tests.outcome == 'failure' | ||
uses: scacap/action-surefire-report@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
functional-test: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
test-config: [ 'static', 'annotation', 'requestmap', 'basic', 'misc', 'putWithParams', 'bcrypt', 'issue503' ] | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11.0.6' | ||
- uses: actions/setup-java@v4 | ||
with: { java-version: 11, distribution: temurin } | ||
- name: Run Tests | ||
id: tests | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/actions/setup-gradle@v3 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
with: | ||
arguments: | | ||
examples-functional-test-app:check | ||
-Dgeb.env=chromeHeadless | ||
-DTESTCONFIG=${{ matrix.test-config }} | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Publish Test Report | ||
if: steps.tests.outcome == 'failure' | ||
uses: scacap/action-surefire-report@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/examples/functional-test-app/build/test-results/test/TEST-*.xml' | ||
build: | ||
if: github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11.0.6' | ||
- uses: gradle/wrapper-validation-action@v2 | ||
- uses: actions/setup-java@v4 | ||
with: { java-version: 11, distribution: temurin } | ||
- name: Run Build | ||
if: github.event_name == 'push' | ||
id: build | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/actions/setup-gradle@v3 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
with: | ||
arguments: | | ||
:spring-security-core:build | ||
spring-security-core:build | ||
-Dgeb.env=chromeHeadless | ||
- name: Publish Test Report | ||
if: steps.build.outcome == 'failure' | ||
uses: scacap/action-surefire-report@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
- name: Publish to repo.grails.org | ||
id: publish | ||
uses: gradle/gradle-build-action@v2 | ||
if: steps.build.outcome == 'success' && github.event_name == 'push' | ||
- name: Publish Snapshot artifacts to Artifactory (repo.grails.org) | ||
uses: gradle/actions/setup-gradle@v3 | ||
if: success() | ||
env: | ||
ORG_GRADLE_PROJECT_artifactoryUsername: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ORG_GRADLE_PROJECT_artifactoryPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
with: | ||
arguments: | | ||
-Dorg.gradle.internal.publish.checksums.insecure=true | ||
:spring-security-core:publish | ||
- name: Build Docs | ||
id: docs | ||
if: steps.build.outcome == 'success' && github.event_name == 'push' | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: :spring-security-core:docs | ||
spring-security-core:publish | ||
- name: Generate Snapshot Documentation | ||
if: success() | ||
uses: gradle/actions/setup-gradle@v3 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Publish to Github Pages | ||
if: steps.docs.outcome == 'success' && github.event_name == 'push' | ||
with: | ||
arguments: spring-security-core:docs | ||
|
||
- name: Publish Snapshot Documentation to Github Pages | ||
if: success() | ||
uses: micronaut-projects/github-pages-deploy-action@grails | ||
env: | ||
TARGET_REPOSITORY: ${{ github.repository }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BRANCH: gh-pages | ||
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} | ||
COMMIT_NAME: ${{ env.GIT_USER_NAME }} | ||
FOLDER: plugin/build/docs | ||
DOC_FOLDER: gh-pages | ||
COMMIT_EMAIL: [email protected] | ||
COMMIT_NAME: Puneet Behl | ||
GH_TOKEN: ${{ secrets.GH_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
Oops, something went wrong.