Skip to content

Update badge

Update badge #11

Workflow file for this run

name: "Java CI"
on:
push:
branches:
- '[5-9].[0-9].x'
pull_request:
branches:
- '[5-9].[0-9].x'
workflow_dispatch:
env:
GIT_USER_NAME: 'grails-build'
GIT_USER_EMAIL: '[email protected]'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17', '21']
steps:
- name: "πŸ“₯ Checkout the repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: ${{ matrix.java }}
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
- name: "πŸ”¨ Run Base Tests"
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
run: ./gradlew check
- name: "β˜„οΈ Upload Base Tests Results - audit-test"
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: testreport-audit-test-${{ matrix.java }}
path: examples/audit-test/build/reports/tests
- name: "β˜„οΈ Upload Base Tests Results - audit-test-allow-update-outside-transaction"
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: testreport-audit-test-allow-update-outside-transaction-${{ matrix.java }}
path: examples/audit-test-allow-update-outside-transaction/build/reports/tests
- name: "πŸ”¨ Run audit-test Outside of Transaction Tests"
if: ${{ always() }}
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.DEVELOCITY_BUILD_CACHE_NODE_KEY }}
run: ./gradlew :examples:audit-test:check -Daudit-test.AuditTrail.datasource=DEFAULT
- name: "β˜„οΈ Upload audit-test Outside of Transaction Tests Results"
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: testreport-audit-test-single-datasource-${{ matrix.java }}
path: examples/audit-test/build/reports/tests
publish:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: "πŸ“₯ Checkout the repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
- name: "πŸ“€ Publish to Snapshot (repo.grails.org)"
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
working-directory: ./plugin
run: ../gradlew publish
- name: "πŸ“œ Generate Documentation"
if: success()
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
working-directory: ./plugin
run: ../gradlew docs
- name: "πŸš€ Publish to Github Pages"
if: success()
uses: micronaut-projects/github-pages-deploy-action@grails
env:
SKIP_SNAPSHOT: ${{ contains(needs.publish.outputs.release_version, 'M') }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: plugin/build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ env.GIT_USER_NAME }}