Skip to content

Commit

Permalink
feat(ci): split no cypress test suite (#9387)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal committed Dec 6, 2023
1 parent e144741 commit 3c0727e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-unified.yml
Expand Up @@ -696,7 +696,12 @@ jobs:
strategy:
fail-fast: false
matrix:
test_strategy: ["no_cypress", "cypress_suite1", "cypress_rest"]
test_strategy: [
"no_cypress_suite0",
"no_cypress_suite1",
"cypress_suite1",
"cypress_rest"
]
needs:
[
setup,
Expand Down Expand Up @@ -792,11 +797,6 @@ jobs:
ACTIONS_CONFIG: "https://raw.githubusercontent.com/acryldata/datahub-actions/main/docker/config/executor.yaml"
run: |
./smoke-test/run-quickstart.sh
- name: sleep 60s
run: |
# we are doing this because gms takes time to get ready
# and we don't have a better readiness check when bootstrap is done
sleep 60s
- name: Disk Check
run: df -h . && docker images
- name: Disable ES Disk Threshold
Expand Down
8 changes: 5 additions & 3 deletions smoke-test/smoke.sh
Expand Up @@ -24,12 +24,14 @@ source venv/bin/activate

source ./set-cypress-creds.sh

# no_cypress, cypress_suite1, cypress_rest
# no_cypress_suite0, no_cypress_suite1, cypress_suite1, cypress_rest
if [[ -z "${TEST_STRATEGY}" ]]; then
pytest -rP --durations=20 -vv --continue-on-collection-errors --junit-xml=junit.smoke.xml
else
if [ "$TEST_STRATEGY" == "no_cypress" ]; then
pytest -rP --durations=20 -vv --continue-on-collection-errors --junit-xml=junit.smoke_non_cypress.xml -k 'not test_run_cypress'
if [ "$TEST_STRATEGY" == "no_cypress_suite0" ]; then
pytest -rP --durations=20 -vv --continue-on-collection-errors --junit-xml=junit.smoke_non_cypress.xml -k 'not test_run_cypress' -m 'not no_cypress_suite1'
elif [ "$TEST_STRATEGY" == "no_cypress_suite1" ]; then
pytest -rP --durations=20 -vv --continue-on-collection-errors --junit-xml=junit.smoke_non_cypress.xml -m 'no_cypress_suite1'
else
pytest -rP --durations=20 -vv --continue-on-collection-errors --junit-xml=junit.smoke_cypress_${TEST_STRATEGY}.xml tests/cypress/integration_test.py
fi
Expand Down
2 changes: 2 additions & 0 deletions smoke-test/test_e2e.py
Expand Up @@ -8,6 +8,8 @@
import tenacity
from datahub.ingestion.run.pipeline import Pipeline

pytestmark = pytest.mark.no_cypress_suite1

from tests.utils import (
get_frontend_url,
get_gms_url,
Expand Down
2 changes: 2 additions & 0 deletions smoke-test/tests/privileges/test_privileges.py
Expand Up @@ -5,6 +5,8 @@
get_frontend_url, get_admin_credentials,get_sleep_info)
from tests.privileges.utils import *

pytestmark = pytest.mark.no_cypress_suite1

sleep_sec, sleep_times = get_sleep_info()

@pytest.fixture(scope="session")
Expand Down
2 changes: 2 additions & 0 deletions smoke-test/tests/timeline/timeline_test.py
@@ -1,4 +1,5 @@
import json
import pytest
from time import sleep

from datahub.cli import timeline_cli
Expand All @@ -7,6 +8,7 @@
from tests.utils import (get_datahub_graph, ingest_file_via_rest,
wait_for_writes_to_sync)

pytestmark = pytest.mark.no_cypress_suite1

def test_all():
platform = "urn:li:dataPlatform:kafka"
Expand Down

0 comments on commit 3c0727e

Please sign in to comment.