-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OGM-1590 Test the build with a GitHub workflow
Run the default build on GitHub.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Hibernate OGM CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
# 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 |