mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-23 08:38:02 +00:00
feat(ci): check for packages, change location of lint (#9759)
This commit is contained in:
parent
eb8017d6eb
commit
fd34e41614
18
.github/scripts/check_python_package.py
vendored
Normal file
18
.github/scripts/check_python_package.py
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
folders = ["./smoke-test/tests"]
|
||||||
|
|
||||||
|
for folder in folders:
|
||||||
|
print(f"Checking folder {folder}")
|
||||||
|
a = [i for i in setuptools.find_packages(folder) if "cypress" not in i]
|
||||||
|
b = [i for i in setuptools.find_namespace_packages(folder) if "cypress" not in i]
|
||||||
|
|
||||||
|
in_a_not_b = set(a) - set(b)
|
||||||
|
in_b_not_a = set(b) - set(a)
|
||||||
|
|
||||||
|
assert (
|
||||||
|
len(in_a_not_b) == 0
|
||||||
|
), f"Found packages in {folder} that are not in namespace packages: {in_a_not_b}"
|
||||||
|
assert (
|
||||||
|
len(in_b_not_a) == 0
|
||||||
|
), f"Found namespace packages in {folder} that are not in packages: {in_b_not_a}"
|
33
.github/workflows/docker-unified.yml
vendored
33
.github/workflows/docker-unified.yml
vendored
@ -37,8 +37,29 @@ env:
|
|||||||
DATAHUB_INGESTION_IMAGE: "acryldata/datahub-ingestion"
|
DATAHUB_INGESTION_IMAGE: "acryldata/datahub-ingestion"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check_lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: hsheth2/sane-checkout-action@v1
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
cache: "pip"
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: "zulu"
|
||||||
|
java-version: 17
|
||||||
|
- name: Ensure packages are correct
|
||||||
|
run: |
|
||||||
|
python ./.github/scripts/check_python_package.py
|
||||||
|
- name: Run lint on smoke test
|
||||||
|
run: |
|
||||||
|
./gradlew :smoke-test:lint
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: check_lint
|
||||||
outputs:
|
outputs:
|
||||||
tag: ${{ steps.tag.outputs.tag }}
|
tag: ${{ steps.tag.outputs.tag }}
|
||||||
slim_tag: ${{ steps.tag.outputs.slim_tag }}
|
slim_tag: ${{ steps.tag.outputs.slim_tag }}
|
||||||
@ -64,18 +85,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: hsheth2/sane-checkout-action@v1
|
uses: hsheth2/sane-checkout-action@v1
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
cache: "pip"
|
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: "zulu"
|
|
||||||
java-version: 17
|
|
||||||
- name: Run lint on smoke test
|
|
||||||
run: |
|
|
||||||
./gradlew :smoke-test:lint
|
|
||||||
- name: Compute Tag
|
- name: Compute Tag
|
||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
"""
|
||||||
|
For helper methods to contain manipulation of the config file in local system.
|
||||||
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -9,9 +13,6 @@ from pydantic import BaseModel, ValidationError
|
|||||||
|
|
||||||
from datahub.cli.env_utils import get_boolean_env_variable
|
from datahub.cli.env_utils import get_boolean_env_variable
|
||||||
|
|
||||||
__help__ = (
|
|
||||||
"For helper methods to contain manipulation of the config file in local system."
|
|
||||||
)
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
DEFAULT_GMS_HOST = "http://localhost:8080"
|
DEFAULT_GMS_HOST = "http://localhost:8080"
|
||||||
|
0
smoke-test/tests/dataproduct/queries/__init__.py
Normal file
0
smoke-test/tests/dataproduct/queries/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user