Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added a workflow to parallelise the E2E tests#697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
msrathore-db merged 24 commits intomainfromtesting
Oct 24, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
24 commits
Select commitHold shift + click to select a range
61af772
Added a workflow to parallelise the E2E tests. Updated E2E tests to c…
msrathore-dbOct 3, 2025
1417f6b
Modified parallel code coverage workflow to fail when e2e tests fail
msrathore-dbOct 3, 2025
bf24771
Fixed parallel coverage check pytest command
msrathore-dbOct 3, 2025
4bbc653
Modified e2e tests to support parallel execution
msrathore-dbOct 3, 2025
7ef1033
Added fallbacks for exit code 5 where we find no test for SEA
msrathore-dbOct 3, 2025
d21f214
Fixed coverage artifact for parallel test workflow
msrathore-dbOct 3, 2025
9cb8999
Debugging coverage check merge
msrathore-dbOct 3, 2025
59e83ab
Improved coverage report merge and removed the test_driver test for f…
msrathore-dbOct 3, 2025
271ecac
Debug commit for coverage merge
msrathore-dbOct 3, 2025
b6ac8cb
Debugging coverage merge 2
msrathore-dbOct 3, 2025
1c2f238
Debugging coverage merge 3
msrathore-dbOct 3, 2025
3657fbd
Removed unnecessary debug statements from the parallel code coverage …
msrathore-dbOct 3, 2025
2b4e257
Added unit test and common e2e tests
msrathore-dbOct 3, 2025
19407ab
Added null checks for coverage workflow
msrathore-dbOct 3, 2025
6df96be
Improved the null check for test list
msrathore-dbOct 3, 2025
602809b
Improved the visibility for test list
msrathore-dbOct 3, 2025
b25ed87
Added check for exit code 5
msrathore-dbOct 3, 2025
b5b6cfb
main changes
msrathore-dbOct 7, 2025
45ef85a
Updated the workflowfor coverage check to use pytst -xdist to run the…
msrathore-dbOct 9, 2025
0e1033a
Enforced the e2e tests should pass
msrathore-dbOct 9, 2025
dac7c55
Changed name for workflow job
msrathore-dbOct 9, 2025
bf0a245
Updated poetry
msrathore-dbOct 9, 2025
39316f8
Removed integration and previous code coverage workflow
msrathore-dbOct 14, 2025
3ac2445
Added the integration workflow again
msrathore-dbOct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some comments aren't visible on the classic Files Changed page.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ permissions:
on: [pull_request, workflow_dispatch]

jobs:
coverage:
test-with-coverage:
runs-on: ubuntu-latest
environment: azure-prod
env:
Expand All@@ -22,9 +22,9 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for coverage comparison
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
repository: ${{ github.event.pull_request.head.repo.full_name ||github.repository }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
Expand DownExpand Up@@ -61,14 +61,18 @@ jobs:
- name: Install library
run: poetry install --no-interaction --all-extras
#----------------------------------------------
#run all tests
# run all tests with coverage
#----------------------------------------------
- name: Run tests with coverage
continue-on-error:true
- name: Runalltests with coverage
continue-on-error:false
run: |
poetry run python -m pytest \
tests/unit tests/e2e \
--cov=src --cov-report=xml --cov-report=term -v
poetry run pytest tests/unit tests/e2e \
-n auto \
--cov=src \
--cov-report=xml \
--cov-report=term \
-v

#----------------------------------------------
# check for coverage override
#----------------------------------------------
Expand DownExpand Up@@ -128,4 +132,5 @@ jobs:
echo "Please ensure this override is justified and temporary"
else
echo "✅ Coverage checks enforced - minimum 85% required"
fi
fi

2 changes: 1 addition & 1 deletion.github/workflows/integration.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,4 +55,4 @@ jobs:
# run test suite
#----------------------------------------------
- name: Run e2e tests
run: poetry run python -m pytest tests/e2e
run: poetry run python -m pytest tests/e2e -n auto
82 changes: 69 additions & 13 deletionspoetry.lock
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

1 change: 1 addition & 0 deletionspyproject.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,6 +39,7 @@ pylint = ">=2.12.0"
black = "^22.3.0"
pytest-dotenv = "^0.5.2"
pytest-cov = "^4.0.0"
pytest-xdist = "^3.0.0"
numpy = [
{ version = ">=1.16.6", python = ">=3.8,<3.11" },
{ version = ">=1.23.4", python = ">=3.11" },
Expand Down
20 changes: 12 additions & 8 deletionstests/e2e/test_complex_types.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
import pytest
from numpy import ndarray
from typing import Sequence
from uuid import uuid4

from tests.e2e.test_driver import PySQLPytestTestCase

Expand All@@ -10,12 +11,15 @@ class TestComplexTypes(PySQLPytestTestCase):
def table_fixture(self, connection_details):
self.arguments = connection_details.copy()
"""A pytest fixture that creates a table with a complex type, inserts a record, yields, and then drops the table"""

table_name = f"pysql_test_complex_types_table_{str(uuid4()).replace('-', '_')}"
self.table_name = table_name

with self.cursor() as cursor:
# Create the table
cursor.execute(
"""
CREATE TABLE IF NOT EXISTSpysql_test_complex_types_table (
f"""
CREATE TABLE IF NOT EXISTS{table_name} (
array_col ARRAY<STRING>,
map_col MAP<STRING, INTEGER>,
struct_col STRUCT<field1: STRING, field2: INTEGER>,
Expand All@@ -27,8 +31,8 @@ def table_fixture(self, connection_details):
)
# Insert a record
cursor.execute(
"""
INSERT INTOpysql_test_complex_types_table
f"""
INSERT INTO{table_name}
VALUES (
ARRAY('a', 'b', 'c'),
MAP('a', 1, 'b', 2, 'c', 3),
Expand All@@ -40,10 +44,10 @@ def table_fixture(self, connection_details):
"""
)
try:
yield
yield table_name
finally:
# Clean up the table after the test
cursor.execute("DELETE FROM pysql_test_complex_types_table")
cursor.execute(f"DROP TABLE IF EXISTS {table_name}")

@pytest.mark.parametrize(
"field,expected_type",
Expand All@@ -61,7 +65,7 @@ def test_read_complex_types_as_arrow(self, field, expected_type, table_fixture):

with self.cursor() as cursor:
result = cursor.execute(
"SELECT * FROMpysql_test_complex_types_table LIMIT 1"
f"SELECT * FROM{table_fixture} LIMIT 1"
).fetchone()

assert isinstance(result[field], expected_type)
Expand All@@ -83,7 +87,7 @@ def test_read_complex_types_as_string(self, field, table_fixture):
extra_params={"_use_arrow_native_complex_types": False}
) as cursor:
result = cursor.execute(
"SELECT * FROMpysql_test_complex_types_table LIMIT 1"
f"SELECT * FROM{table_fixture} LIMIT 1"
).fetchone()

assert isinstance(result[field], str)
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp