Tests #3510
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
| # This file is scaffolded by `atlan-application-sdk-conformance bootstrap` | |
| # and drift-tracked at WARN by conformance check C002. | |
| # | |
| # Edit it freely — drift NEVER blocks CI (C002 is WARN-only, not BLOCK). | |
| # To pull structural updates from canonical, re-run bootstrap with --resync: | |
| # atlan-application-sdk-conformance bootstrap --resync | |
| # (--resync preserves this file's per-repo values; pass --app-name etc. only | |
| # to deliberately CHANGE them.) | |
| name: Tests | |
| # Unified workflow — unit + integration (testcontainers), and full-DAG e2e. | |
| # | |
| # tests — unit + integration tests via connector-integration-tests | |
| # composite. Source systems should start from session-scoped | |
| # pytest fixtures (see mysql/metabase conftest.py); uncomment | |
| # services-script below only if that pattern doesn't fit. | |
| # e2e — full-DAG tests against a real tenant via e2e-full-reusable. | |
| # Triggered by the 'e2e' PR label or workflow_dispatch. | |
| # Tests Gate — aggregator gate; the single required check for branch | |
| # protection. tests must pass; e2e can be skipped. | |
| # Make it required as soon as this file is merged — it does not | |
| # wait on a coverage target or on every tier being wired up. | |
| # The exact context string to require is: | |
| # tests / Tests Gate | |
| # i.e. the `tests:` job below (which calls the reusable), then | |
| # the gate's own job name. The workflow name is NOT part of it, | |
| # even though the UI's checks list displays it. Rename the | |
| # `tests:` job and the context changes with it. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| # `labeled` is what makes adding the `e2e` label start a run. GitHub has | |
| # no trigger-level filter for WHICH label, so an unrelated label add | |
| # creates a run here too — the SDK's reusable workflow gates on | |
| # `github.event.label.name` so those runs skip in seconds instead of | |
| # re-running the live-tenant suite (FND-48). Keep the type; the filtering | |
| # is not this file's job. | |
| - opened | |
| - synchronize | |
| - reopened | |
| - labeled | |
| branches: | |
| - main | |
| merge_group: | |
| workflow_dispatch: | |
| inputs: | |
| application_sdk_ref: | |
| description: | | |
| Branch/SHA of atlanhq/application-sdk for cross-repo dispatch. | |
| Pins SDK in tests + e2e jobs. Empty = lockfile version. | |
| required: false | |
| default: "" | |
| type: string | |
| distinct_id: | |
| description: | | |
| Identifier for codex-/return-dispatch matching. Echoed in step | |
| names so the calling workflow can locate this run via the GH API. | |
| required: false | |
| default: "" | |
| type: string | |
| agent_name_override: | |
| description: | | |
| Override agent-name for the e2e job (default ci-<run_id>). | |
| Useful when re-running against a worker that is already up. | |
| required: false | |
| default: "" | |
| type: string | |
| run_e2e: | |
| description: "Set to 'true' to trigger the e2e job (cross-repo dispatch from application-sdk). Defaults to off." | |
| required: false | |
| default: "" | |
| type: string | |
| base_image_ref: | |
| description: | | |
| Runtime base image for the connector Docker build (BASE_IMAGE | |
| build-arg), set by the application-sdk PR dispatch so SDK | |
| base-image / Dockerfile / daprd changes are exercised. Empty = | |
| the connector Dockerfile default base. | |
| required: false | |
| default: "" | |
| type: string | |
| e2e_clouds: | |
| description: | | |
| Cloud providers to run the e2e suites against, comma-separated | |
| (default aws,azure,gcp — every suite runs once per CSP tenant). | |
| Narrow it to re-run a single cloud, e.g. when one tenant was down. | |
| Empty here means "use the SDK default", not "no clouds". | |
| required: false | |
| default: "" | |
| type: string | |
| jobs: | |
| tests: | |
| uses: atlanhq/application-sdk/.github/workflows/tests-reusable.yaml@main | |
| with: | |
| # Local floor, deliberately above the SDK reusable's "0" default. Not a | |
| # value --resync reads back, so re-check it survives after every resync. | |
| unit-coverage-fail-under: "90" | |
| app-name: "metabase" | |
| app-image-name: "atlan-metabase-app" | |
| # services-script: .github/test/setup-services.sh | |
| # Uncomment services-script (and add the script) if your source systems | |
| # need CI-level startup rather than pytest fixtures. See mysql/metabase | |
| # tests/integration/conftest.py for the preferred fixture-based approach, | |
| # and openapi's .github/test/setup-services.sh for a reference | |
| # demonstration of the hook (used intentionally to exercise the pattern). | |
| # Review test-paths and pytest-args before committing; defaults auto-discover. | |
| application-sdk-ref: ${{ inputs.application_sdk_ref }} | |
| distinct-id: ${{ inputs.distinct_id }} | |
| run-e2e: ${{ inputs.run_e2e }} | |
| base-image-ref: ${{ inputs.base_image_ref }} | |
| agent-name-override: ${{ inputs.agent_name_override }} | |
| # Cross-CSP e2e matrix (FND-6): every e2e suite runs once per cloud | |
| # provider, against that cloud's tenant. Forwarded empty on every | |
| # non-dispatch event, which the SDK reads as "use the current default | |
| # cloud list" — so the list stays defined in application-sdk and this | |
| # file never needs an edit when a fourth CSP is added. Pass "none" on a | |
| # dispatch to fall back to the single legacy tenant. | |
| e2e-clouds: ${{ inputs.e2e_clouds }} | |
| # ADR-0014 two-store SDR posture (docs/adr/0014-two-store-storage- | |
| # architecture.md in application-sdk): the e2e job's `objectstore` | |
| # is forced to the SDK-default CI-local binding and | |
| # ENABLE_ATLAN_UPLOAD=true is set on the worker, so a connector | |
| # code path that forgets to bridge an artifact via App.upload() | |
| # from `objectstore` to `atlan-objectstore` shows up as zero | |
| # downstream assets/lineage in Atlas. See atlan-mysql-app#381 for | |
| # the first adopter + confirmed end-to-end proof of the boundary | |
| # crossing. | |
| two-store: true | |
| secrets: inherit |