fix: reconcile RC1 API catalog contracts #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate maintained examples | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 6 * * 1" | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| python: | ||
| name: Python ${{ matrix.python-version }} | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| OPENMETADATA_SOURCE: ${{ runner.temp }}/openmetadata-source | ||
| OPENMETADATA_SOURCE_COMMIT: 8e199f486b63df9f44d4c827a9f43559d9e56e07 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12"] | ||
| steps: | ||
| - name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: pip | ||
| cache-dependency-path: | | ||
| custom-connector/pyproject.toml | ||
| custom-graphql/pyproject.toml | ||
| dynamic_csv_importer/requirements.txt | ||
| api-lineage-cicd/requirements.txt | ||
| ingestion-automation/requirements.txt | ||
| platform-api/pyproject.toml | ||
| - name: Check out the pinned OpenMetadata source contracts | ||
| run: | | ||
| git init "${OPENMETADATA_SOURCE}" | ||
| git -C "${OPENMETADATA_SOURCE}" remote add origin https://github.com/open-metadata/OpenMetadata.git | ||
| git -C "${OPENMETADATA_SOURCE}" sparse-checkout init --cone | ||
| git -C "${OPENMETADATA_SOURCE}" sparse-checkout set \ | ||
| openmetadata-service/src/main/java/org/openmetadata/service/resources \ | ||
| openmetadata-service/src/main/java/org/openmetadata/service/security \ | ||
| openmetadata-spec/src/main/resources/json/schema | ||
| git -C "${OPENMETADATA_SOURCE}" fetch --depth=1 origin "${OPENMETADATA_SOURCE_COMMIT}" | ||
| git -C "${OPENMETADATA_SOURCE}" checkout --detach FETCH_HEAD | ||
| - name: Install exact OpenMetadata RC and test dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install --editable './custom-connector[test]' | ||
| python -m pip install --editable ./custom-graphql | ||
| python -m pip install --editable ./platform-api | ||
| python -m pip install \ | ||
| --requirement dynamic_csv_importer/requirements.txt \ | ||
| --requirement api-lineage-cicd/requirements.txt \ | ||
| --requirement ingestion-automation/requirements.txt | ||
| - name: Verify the installed OpenMetadata version | ||
| run: | | ||
| python - <<'PY' | ||
| from importlib.metadata import version | ||
| assert version("openmetadata-ingestion") == "2.0.0.0rc1" | ||
| PY | ||
| - name: Compile Python sources | ||
| run: >- | ||
| python -m compileall -q | ||
| custom-connector/src | ||
| custom-connector/tests | ||
| custom-graphql | ||
| dynamic_csv_importer | ||
| api-lineage-cicd | ||
| ingestion-automation | ||
| platform-api/src | ||
| platform-api/tests | ||
| tests | ||
| - name: Lint and check formatting | ||
| run: | | ||
| ruff check . | ||
| ruff format --check . | ||
| - name: Run model, configuration, import, and request tests | ||
| run: pytest | ||
| - name: Verify reproducible API ledgers and reference | ||
| run: | | ||
| python -m openmetadata_demo_api.generate \ | ||
| --source "${OPENMETADATA_SOURCE}" \ | ||
| --output platform-api/src/openmetadata_demo_api/ledgers \ | ||
| --check | ||
| python -m openmetadata_demo_api.generate_reference \ | ||
| --output platform-api/docs/generated \ | ||
| --check | ||
| git diff --exit-code -- \ | ||
| platform-api/src/openmetadata_demo_api/ledgers \ | ||
| platform-api/docs/generated | ||
| - name: Exercise offline API catalog commands | ||
| run: | | ||
| python -m openmetadata_demo_api list > /dev/null | ||
| python -m openmetadata_demo_api render --operation-id createTable > /dev/null | ||
| python -m openmetadata_demo_api run --scenario core-catalog-assets > /dev/null | ||
| python -m openmetadata_demo_api coverage > /dev/null | ||
| node: | ||
| name: Node fixture | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: custom-graphql/server | ||
| steps: | ||
| - name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 24 | ||
| cache: npm | ||
| cache-dependency-path: custom-graphql/server/package-lock.json | ||
| - name: Install locked dependencies | ||
| run: npm ci --ignore-scripts | ||
| - name: Audit dependencies | ||
| run: npm audit --audit-level=high | ||
| - name: Check JavaScript syntax | ||
| run: | | ||
| node --check index.js | ||
| node --check resolvers.js | ||
| node --check schema.js | ||
| compose: | ||
| name: Docker Compose configuration | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| - name: Download the official OpenMetadata 2.0 RC1 Compose file | ||
| run: >- | ||
| curl --fail --silent --show-error --location | ||
| --output "${RUNNER_TEMP}/docker-compose-postgres.yml" | ||
| https://github.com/open-metadata/OpenMetadata/releases/download/2.0.0-rc1-release/docker-compose-postgres.yml | ||
| - name: Validate the Compose overlay | ||
| run: >- | ||
| docker compose | ||
| --project-directory "${GITHUB_WORKSPACE}" | ||
| --file "${RUNNER_TEMP}/docker-compose-postgres.yml" | ||
| --file custom-connector/docker/compose.override.yml | ||
| config --quiet | ||
| links: | ||
| name: Markdown links | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| - name: Check Markdown links | ||
| uses: lycheeverse/lychee-action@v2.9.0 | ||
| with: | ||
| args: --no-progress --config .lychee.toml './**/*.md' | ||
| fail: true | ||
| secrets: | ||
| name: Gitleaks | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| - name: Scan the repository | ||
| run: >- | ||
| docker run --rm | ||
| --volume "${GITHUB_WORKSPACE}:/repo" | ||
| zricethezav/gitleaks:v8.27.0 | ||
| dir /repo --redact --no-banner | ||