Skip to content

OGM-1590 Workflow is enabled on main (not master) #2

OGM-1590 Workflow is enabled on main (not master)

OGM-1590 Workflow is enabled on main (not master) #2

Workflow file for this run

name: Hibernate OGM CI
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
# Allow running this workflow against a specific branch/tag
workflow_dispatch:
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
concurrency:
# Consider that two builds are in the same concurrency group (cannot run concurrently)
# if they use the same workflow and are about the same branch ("ref"), pull request, and branch (for scheduled job).
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}, branch=${{ inputs.branch }}"
# Cancel previous builds in the same concurrency group even if they are in process
# for pull requests or pushes to forks (not the upstream repository).
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'hibernate/hibernate-reactive' }}
jobs:
test_dbs:
name: Test default build with all embedded databases
runs-on: ubuntu-latest
steps:
- name: Checkout default branch
uses: actions/checkout@v2
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Set up JDK 8
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 8
# https://github.com/actions/cache/blob/main/examples.md#java---maven
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up Maven
run: ./mvnw -v
- name: Run default build
run: |
./mvnw install -s settings-example.xml
- name: Upload build reports (if build failed)
uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
name: reports-db-ogm
path: './**/build/reports/'
retention-days: 7