Skip to content

Merge pull request #203 from apache/develocity-apache-org #452

Merge pull request #203 from apache/develocity-apache-org

Merge pull request #203 from apache/develocity-apache-org #452

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Java CI"
on:
push:
branches:
- '[3-9]+.[0-9]+.x'
pull_request:
branches:
- '[3-9]+.[0-9]+.x'
workflow_dispatch:
permissions:
packages: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
tests:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Test (Redis ${{ matrix.redis-version }})"
runs-on: ubuntu-24.04
container: ubuntu
strategy:
matrix:
redis-version: [6, 7]
services:
redis:
image: redis:${{ matrix.redis-version }}
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: 17
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "πŸƒβ€β™‚οΈ Run Build"
id: build
env:
REDIS_HOST: redis
REDIS_PORT: 6379
run: ./gradlew build --continue
publish_snapshot:
needs: tests
if: ${{ always() && github.repository_owner == 'apache' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (needs.tests.result == 'success' || needs.tests.result == 'skipped') }}
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: 17
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "πŸ“€ Publish Snapshot Artifacts"
id: publish
env:
GRAILS_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW }}
run: ./gradlew --no-build-cache publish
- name: "πŸ”¨ Generate Snapshot Documentation"
run: ./gradlew :grails-redis:groovydoc
- name: "πŸš€ Publish to Github Pages"
uses: apache/grails-github-actions/deploy-github-pages@asf
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_RELEASE: 'false'
SOURCE_FOLDER: plugin/build/docs