Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ github:
# of the job's `name` property if it's present.
contexts:
- markdown-link-check
- build
- "Unit Tests"
- "Quarkus Tests"
- "Integration Tests"
- regtest
- spark-plugin-regtest
- site
Expand Down
90 changes: 62 additions & 28 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,65 +33,99 @@ on:
branches: [ "main" ]

jobs:

# TODO remove this job in a future PR
build:

runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Always succeeds
run: echo "Success!"

unit-tests:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update .asf.yaml as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're going to have a problem to merge this PR because the build job is still marked as required, but it doesn't exist anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the old build job around to make it possible to merge this PR. We'd need to remove that job in a separate PR.

name: Unit Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 21
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
with:
java-version: '21'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
with:
# The setup-gradle action fails, if the wrapper is not using the right version or is not present.
# Our `gradlew` validates the integrity of the `gradle-wrapper.jar`, so it's safe to disable this.
validate-wrappers: false

- name: Code style checks and tests
run: ./gradlew --continue check

- name: Check Maven publication
run: ./gradlew publishToMavenLocal sourceTarball

- name: Run unit tests
run: |
./gradlew check sourceTarball distTar distZip publishToMavenLocal \
-x :polaris-runtime-service:test \
-x :polaris-admin:test \
-x intTest --continue
- name: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: upload-test-artifacts
name: upload-unit-test-artifacts
path: |
**/build/test-results/**

- name: Stop Gradle daemons
run: ./gradlew --stop

# Ensure that the build works properly when building against the "latest greatest" Java version
- name: Set up JDK 23
quarkus-tests:
name: Quarkus Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 21
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
with:
java-version: '23'
java-version: '21'
distribution: 'temurin'
- name: Show Java version
run: java -version
- name: Clean
run: ./gradlew clean
- name: Build
run: ./gradlew compileAll
- name: Run selected tests
run: ./gradlew :polaris-runtime-service:intTest
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
with:
validate-wrappers: false
- name: Run Quarkus tests
run: |
./gradlew \
:polaris-runtime-service:test \
:polaris-admin:test \
--continue
- name: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: upload-quarkus-test-artifacts
path: |
**/build/test-results/**

integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 21
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
with:
validate-wrappers: false
- name: Run integration tests
run: ./gradlew intTest --continue
- name: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: upload-test-artifacts-java-23
name: upload-integration-test-artifacts
path: |
**/build/test-results/**
Loading