Skip to content
Merged
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
11 changes: 8 additions & 3 deletions .github/workflows/openmetadata-service-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
timeout-minutes: 90
needs: changes
if: ${{ needs.changes.outputs.java == 'true' }}
strategy:
fail-fast: false
matrix:
database: [mysql, postgresql]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -97,20 +101,20 @@ jobs:
librdkafka-dev unixodbc-dev libevent-dev jq
sudo make install_antlr_cli

- name: Run openmetadata-service unit tests
- name: Run openmetadata-service unit tests (${{ matrix.database }})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn -B clean package -pl openmetadata-service -am \
-Pstatic-code-analysis \
-Pstatic-code-analysis,${{ matrix.database }} \
-DfailIfNoTests=false \
Comment on lines 107 to 110
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

The matrix adds -P... ,${{ matrix.database }} but Maven profiles mysql/postgresql don’t appear to be defined in the root pom.xml or openmetadata-service/pom.xml (they only exist in openmetadata-sdk/pom.xml). With mvn ... -pl openmetadata-service -am, those profiles are likely not available/active, so this will run the same unit test suite twice and won’t actually switch database behavior.

Consider either defining these profiles in the root/service POM (so they apply to this build) or passing an explicit property/env that the service tests actually consume (e.g., -Dtest.database=...) and wiring tests to use it.

Copilot uses AI. Check for mistakes.
-Dsonar.skip=true

- name: Upload surefire reports
if: ${{ failure() && hashFiles('openmetadata-service/target/surefire-reports/TEST-*.xml') != '' }}
uses: actions/upload-artifact@v4
with:
name: openmetadata-service-surefire-reports
name: openmetadata-service-surefire-reports-${{ matrix.database }}
path: openmetadata-service/target/surefire-reports/

- name: Publish Test Report
Expand All @@ -120,6 +124,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_test_failures: true
report_paths: "openmetadata-service/target/surefire-reports/TEST-*.xml"
check_name: "Test Report (${{ matrix.database }})"

# Single required-check gate for branch protection.
# Skipped (= "Success") when all test jobs pass or are legitimately skipped.
Expand Down
Loading