OpenMetadata/.github/workflows/py-cli-e2e-tests.yml
Nahuel 37105e09df
Add CLI e2e tests workflow dispatch (#8053)
* Add CLI E2E tests for MySQL

* Fix setup.py and pylint

* Add missing doc and update code after pylint refactor

* Add manual trigger for py-cli-e2e-tests GH action
2022-10-10 11:50:20 +02:00

70 lines
2.0 KiB
YAML

# 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: py-cli-e2e-tests
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
py-cli-e2e-tests:
runs-on: ubuntu-latest
strategy:
matrix:
py-version: ['3.9']
e2e-test: ['mysql']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Set up Python ${{ matrix.py-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py-version }}
- name: Install Ubuntu dependencies
run: |
sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
unixodbc-dev libevent-dev python3-dev
- name: Generate models
run: |
python3 -m venv env
source env/bin/activate
sudo make install_antlr_cli
make install_dev generate
- name: Install open-metadata dependencies
run: |
source env/bin/activate
make install_all install_test
- name: Start Server and Ingest Sample Data
env:
INGESTION_DEPENDENCY: "mysql,elasticsearch"
run: ./docker/run_local_docker.sh -m no-ui
timeout-minutes: 30
- name: Run Python Tests
env:
E2E_TEST: ${{ matrix.e2e-test }}
run: |
source env/bin/activate
python -m pytest -c ingestion/setup.cfg ingestion/tests/cli_e2e/test_cli_$E2E_TEST.py