mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-06-27 04:22:05 +00:00
67 lines
2.4 KiB
YAML
67 lines
2.4 KiB
YAML
name: Setup OpenMetadata Test Environment
|
|
description: Steps needed to have a coherent test environment
|
|
|
|
inputs:
|
|
python-version:
|
|
description: Python Version to install
|
|
required: true
|
|
args:
|
|
description: Arguments to pass to run_local_docker.sh
|
|
required: false
|
|
default: "-m no-ui -d mysql" # Use "-d postgresql" for postgres and Opensearch
|
|
ingestion_dependency:
|
|
description: Ingestion dependency to pass to run_local_docker.sh
|
|
required: false
|
|
default: "mysql,elasticsearch,sample-data"
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
# ---- Install Ubuntu Dependencies ---------------------------------------------
|
|
- name: Install Ubuntu dependencies
|
|
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 \
|
|
libevent-dev python3-dev libkrb5-dev tdsodbc && ACCEPT_EULA=Y sudo apt-get -qq install -y msodbcsql18
|
|
shell: bash
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ---- Setup Java --------------------------------------------------------------
|
|
- name: Setup JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ---- Setup Python Test Environment -------------------------------------------
|
|
- name: Setup Python ${{ inputs.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
|
|
- name: Generate Models
|
|
run: |
|
|
python3 -m venv env
|
|
source env/bin/activate
|
|
sudo make install_antlr_cli
|
|
make install_dev generate
|
|
shell: bash
|
|
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
source env/bin/activate
|
|
make install_all install_test
|
|
shell: bash
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ---- Start OpenMetadata Server and ingest Sample Data ------------------------
|
|
- name: Start Server and Ingest Sample Data
|
|
uses: nick-fields/retry@v3.0.2
|
|
env:
|
|
INGESTION_DEPENDENCY: ${{ inputs.ingestion_dependency }}
|
|
with:
|
|
timeout_minutes: 60
|
|
max_attempts: 2
|
|
retry_on: error
|
|
command: ./docker/run_local_docker.sh ${{ inputs.args }}
|