-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Faster tests #24948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster tests #24948
Changes from all commits
9582c7b
f1c0d65
e470a51
292ae54
d9eabbb
3444136
8df7412
c3a0b7b
0ab97ca
45df27d
cea921c
16968c7
cd2a497
eb5b0c1
315215a
bd1724f
e7d7a6e
7403c10
a7090eb
f8e88f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| # Copyright 2021 Collate | ||
| # Licensed 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 | ||
| # http://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: Integration Tests - MySQL + Elasticsearch | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "openmetadata-service/**" | ||
| - "openmetadata-integration-tests/**" | ||
| - "openmetadata-spec/src/main/resources/json/schema/**" | ||
| - "openmetadata-sdk/**" | ||
| - "common/**" | ||
| - "pom.xml" | ||
| - "bootstrap/**" | ||
| pull_request_target: | ||
| types: [labeled, opened, synchronize, reopened, ready_for_review] | ||
| paths: | ||
| - "openmetadata-service/**" | ||
| - "openmetadata-integration-tests/**" | ||
| - "openmetadata-spec/src/main/resources/json/schema/**" | ||
| - "openmetadata-sdk/**" | ||
| - "common/**" | ||
| - "pom.xml" | ||
| - "bootstrap/**" | ||
|
|
||
| permissions: | ||
| contents: read | ||
| checks: write | ||
|
|
||
| concurrency: | ||
| group: integration-tests-mysql-es-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| integration-tests-mysql-elasticsearch: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ !github.event.pull_request.draft }} | ||
| steps: | ||
| - name: Wait for the labeler | ||
| uses: lewagon/wait-on-check-action@v1.3.4 | ||
| if: ${{ github.event_name == 'pull_request_target' }} | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| check-name: Team Label | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| wait-interval: 90 | ||
|
|
||
| - name: Verify PR labels | ||
| uses: jesusvasquez333/verify-pr-label-action@v1.4.0 | ||
| if: ${{ github.event_name == 'pull_request_target' }} | ||
| with: | ||
| github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
| valid-labels: 'safe to test' | ||
| pull-request-number: '${{ github.event.pull_request.number }}' | ||
| disable-reviews: true # To not auto approve changes | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| - name: Cache Maven dependencies | ||
| id: cache-output | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.m2 | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
|
|
||
| - name: Set up JDK 21 | ||
| if: steps.cache-output.outputs.exit-code == 0 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Install Ubuntu dependencies | ||
| if: steps.cache-output.outputs.exit-code == 0 | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ | ||
| librdkafka-dev unixodbc-dev libevent-dev jq | ||
| sudo make install_antlr_cli | ||
|
|
||
| - name: Build with Maven | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: mvn -DskipTests clean install -pl '!openmetadata-ui,!openmetadata-docs,!openmetadata-docs-v1' -am | ||
|
|
||
| - name: Run Integration Tests (MySQL + Elasticsearch) | ||
|
Comment on lines
+97
to
+102
Check failureCode scanning / CodeQL Checkout of untrusted code in a privileged context Critical
Potential execution of untrusted code on a privileged workflow (
pull_request_target Error loading related location Loading |
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: mvn test -pl :openmetadata-integration-tests -Pmysql-elasticsearch | ||
|
|
||
| - name: Clean Up | ||
|
Comment on lines
+102
to
+107
Check failureCode scanning / CodeQL Checkout of untrusted code in a privileged context Critical
Potential execution of untrusted code on a privileged workflow (
pull_request_target Error loading related location Loading |
||
| run: | | ||
| cd ./docker/development | ||
| docker compose down --remove-orphans | ||
| sudo rm -rf ${PWD}/docker-volume | ||
|
|
||
| - name: Publish Test Report | ||
|
|
||
| if: ${{ always() }} | ||
| uses: scacap/action-surefire-report@v1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| fail_on_test_failures: true | ||
| report_paths: 'openmetadata-integration-tests/target/surefire-reports/TEST-*.xml' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| # Copyright 2021 Collate | ||
| # Licensed 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 | ||
| # http://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: Integration Tests - PostgreSQL + OpenSearch | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "openmetadata-service/**" | ||
| - "openmetadata-integration-tests/**" | ||
| - "openmetadata-spec/src/main/resources/json/schema/**" | ||
| - "openmetadata-sdk/**" | ||
| - "common/**" | ||
| - "pom.xml" | ||
| - "bootstrap/**" | ||
| pull_request_target: | ||
| types: [labeled, opened, synchronize, reopened, ready_for_review] | ||
| paths: | ||
| - "openmetadata-service/**" | ||
| - "openmetadata-integration-tests/**" | ||
| - "openmetadata-spec/src/main/resources/json/schema/**" | ||
| - "openmetadata-sdk/**" | ||
| - "common/**" | ||
| - "pom.xml" | ||
| - "bootstrap/**" | ||
|
|
||
| permissions: | ||
| contents: read | ||
| checks: write | ||
|
|
||
| concurrency: | ||
| group: integration-tests-pg-os-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| integration-tests-postgres-opensearch: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ !github.event.pull_request.draft }} | ||
| steps: | ||
| - name: Wait for the labeler | ||
| uses: lewagon/wait-on-check-action@v1.3.4 | ||
| if: ${{ github.event_name == 'pull_request_target' }} | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| check-name: Team Label | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| wait-interval: 90 | ||
|
|
||
| - name: Verify PR labels | ||
| uses: jesusvasquez333/verify-pr-label-action@v1.4.0 | ||
| if: ${{ github.event_name == 'pull_request_target' }} | ||
| with: | ||
| github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
| valid-labels: 'safe to test' | ||
| pull-request-number: '${{ github.event.pull_request.number }}' | ||
| disable-reviews: true # To not auto approve changes | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| - name: Cache Maven dependencies | ||
| id: cache-output | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.m2 | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
|
|
||
| - name: Set up JDK 21 | ||
| if: steps.cache-output.outputs.exit-code == 0 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Install Ubuntu dependencies | ||
| if: steps.cache-output.outputs.exit-code == 0 | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ | ||
| librdkafka-dev unixodbc-dev libevent-dev jq | ||
| sudo make install_antlr_cli | ||
|
|
||
| - name: Build with Maven | ||
|
Comment on lines
+89
to
+97
Check failureCode scanning / CodeQL Checkout of untrusted code in a privileged context Critical
Potential execution of untrusted code on a privileged workflow (
pull_request_target Error loading related location Loading |
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: mvn -DskipTests clean install -pl '!openmetadata-ui,!openmetadata-docs,!openmetadata-docs-v1' -am | ||
|
|
||
| - name: Run Integration Tests (PostgreSQL + OpenSearch) | ||
|
Comment on lines
+97
to
+102
Check failureCode scanning / CodeQL Checkout of untrusted code in a privileged context Critical
Potential execution of untrusted code on a privileged workflow (
pull_request_target Error loading related location Loading |
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: mvn test -pl :openmetadata-integration-tests -Ppostgres-opensearch | ||
|
|
||
| - name: Clean Up | ||
|
Comment on lines
+102
to
+107
Check failureCode scanning / CodeQL Checkout of untrusted code in a privileged context Critical
Potential execution of untrusted code on a privileged workflow (
pull_request_target Error loading related location Loading |
||
| run: | | ||
| cd ./docker/development | ||
| docker compose down --remove-orphans | ||
| sudo rm -rf ${PWD}/docker-volume | ||
|
|
||
| - name: Publish Test Report | ||
|
|
||
| if: ${{ always() }} | ||
| uses: scacap/action-surefire-report@v1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| fail_on_test_failures: true | ||
| report_paths: 'openmetadata-integration-tests/target/surefire-reports/TEST-*.xml' | ||
Check failure
Code scanning / CodeQL
Checkout of untrusted code in a privileged context Critical