bf2343b7e4
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
113 lines
4.1 KiB
YAML
113 lines
4.1 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
|
|
java-version:
|
|
description: Java Version to install
|
|
default: '21'
|
|
npm-version:
|
|
description: NPM Version to install
|
|
default: 'v22.x'
|
|
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
|
|
startup-script:
|
|
description: Startup script used to launch the local OpenMetadata test environment
|
|
required: false
|
|
default: "./docker/run_local_docker.sh"
|
|
ingestion_dependency:
|
|
description: Ingestion dependency to pass to run_local_docker.sh
|
|
required: false
|
|
default: "mysql,elasticsearch,sample-data"
|
|
install-server:
|
|
description: Whether to install Java, Node, and the OpenMetadata server
|
|
required: false
|
|
default: "true"
|
|
|
|
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 ${{ inputs.java-version }}
|
|
if: ${{ inputs.install-server == 'true' }}
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: ${{ inputs.java-version }}
|
|
distribution: 'temurin'
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ---- Setup Node --------------------------------------------------------------
|
|
- name: Use Node.js ${{ inputs.npm-version }}
|
|
if: ${{ inputs.install-server == 'true' }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ inputs.npm-version }}
|
|
|
|
- name: Install yarn
|
|
if: ${{ inputs.install-server == 'true' }}
|
|
run: corepack enable
|
|
shell: bash
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ---- Setup Python Test Environment -------------------------------------------
|
|
- name: Setup Python ${{ inputs.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v4
|
|
|
|
- name: Generate Models
|
|
run: |
|
|
python3 -m venv env
|
|
source env/bin/activate
|
|
sudo make install_antlr_cli
|
|
uv pip install "${{ github.workspace }}/ingestion[dev]"
|
|
make generate
|
|
shell: bash
|
|
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
source env/bin/activate
|
|
uv pip install "setuptools<81"
|
|
uv pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
|
|
uv pip install --no-deps "sqlalchemy-redshift==0.8.14" "sqlalchemy-ibmi==0.9.3" "pydoris-custom==1.1.0"
|
|
uv pip install "${{ github.workspace }}/ingestion[all]"
|
|
uv pip install "${{ github.workspace }}/ingestion[test]"
|
|
uv pip install nox
|
|
shell: bash
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ---- Start OpenMetadata Server and ingest Sample Data ------------------------
|
|
- name: Configure Test Session Limit
|
|
if: ${{ inputs.install-server == 'true' }}
|
|
run: |
|
|
if [ -z "${AUTHENTICATION_MAX_ACTIVE_SESSIONS_PER_USER:-}" ]; then
|
|
echo "AUTHENTICATION_MAX_ACTIVE_SESSIONS_PER_USER=10000" >> "$GITHUB_ENV"
|
|
fi
|
|
shell: bash
|
|
|
|
- name: Start Server and Ingest Sample Data
|
|
if: ${{ inputs.install-server == 'true' }}
|
|
uses: nick-fields/retry@v3.0.2
|
|
env:
|
|
INGESTION_DEPENDENCY: ${{ inputs.ingestion_dependency }}
|
|
with:
|
|
timeout_minutes: 60
|
|
max_attempts: 2
|
|
retry_on: error
|
|
command: ${{ inputs.startup-script }} ${{ inputs.args }}
|