added workflow for selenium tests without sample data (#1999)

* added workflow for selenium tests without sample data

* change in drop-create command

* using different approach to start server

* minor change

* minor change

* adding timeout to start server step
This commit is contained in:
parthp2107 2022-01-03 16:36:32 +05:30 committed by GitHub
parent 40b7389741
commit 59de16125d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 8 deletions

View File

@ -0,0 +1,58 @@
# 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.
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Selenium No Ingestion Java CI
on:
push:
branches: [ main ]
paths:
- 'openmetadata-ui/src/main/resources/ui/**'
- 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pagesWithoutData/**'
pull_request:
branches: [ main ]
paths:
- 'openmetadata-ui/src/main/resources/ui/**'
- 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pagesWithoutData/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Generating Data Models
run: make install_dev generate
- name: Maven Package
run: mvn -DskipTests clean package
- name: Start Server
run: cd docker/local-metadata && docker-compose up -d openmetadata-server mysql elasticsearch
timeout-minutes: 20
- name: Sleep for 30 seconds
run: sleep 30s
shell: bash
- name: Run Page Tests without data
run: mvn clean test -Dtest="org.openmetadata.catalog.selenium.pagesWithoutData.**.*.java" -DfailIfNoTests=false

View File

@ -20,13 +20,11 @@ on:
paths: paths:
- 'openmetadata-ui/src/main/resources/ui/**' - 'openmetadata-ui/src/main/resources/ui/**'
- 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pages/**' - 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pages/**'
- 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pagesWithoutData/**'
pull_request: pull_request:
branches: [main] branches: [main]
paths: paths:
- 'openmetadata-ui/src/main/resources/ui/**' - 'openmetadata-ui/src/main/resources/ui/**'
- 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pages/**' - 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pages/**'
- 'openmetadata-ui/src/test/java/org/openmetadata/catalog/selenium/pagesWithoutData/**'
jobs: jobs:
build: build:
@ -50,8 +48,3 @@ jobs:
- name: Run Page Tests - name: Run Page Tests
run: mvn clean test -Dtest="org.openmetadata.catalog.selenium.pages.**.*.java" -DfailIfNoTests=false run: mvn clean test -Dtest="org.openmetadata.catalog.selenium.pages.**.*.java" -DfailIfNoTests=false
- name: Drop-Create
run: docker exec -it openmetadata_server ./openmetadata-0.8.0-SNAPSHOT/bootstrap/bootstrap_storage.sh drop-create-all
- name : Run Page Tests without data
run: mvn clean test -Dtest="org.openmetadata.catalog.selenium.pagesWithoutData.**.*.java" -DfailIfNoTests=false

View File

@ -138,4 +138,3 @@ public class MyDataPageTest {
webDriver.switchTo().window(tabs.get(0)).close(); webDriver.switchTo().window(tabs.get(0)).close();
} }
} }