From a16943e59bc8dae581736dc512266a95cc97bbed Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 22:46:01 +0000 Subject: [PATCH 01/11] ci(test): Add alternative test reporting actions Co-Authored-By: Aaron Steers --- .github/workflows/python_pytest.yml | 27 +++++++++++++++++++++++++++ tests/test_report_demo.py | 9 +++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/test_report_demo.py diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index d70bc4449..643d99b50 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -23,6 +23,10 @@ jobs: pytest-fast: name: Pytest (Fast) runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + contents: read steps: # Common steps: - name: Checkout code @@ -47,6 +51,7 @@ jobs: poetry run coverage run -m pytest --durations=5 --exitfirst -m "not slow and not requires_creds and not linting and not flaky" + --junitxml=.coverage/junit/test-results.xml - name: Print Coverage Report if: always() @@ -55,6 +60,7 @@ jobs: - name: Create Coverage Artifacts if: always() run: | + mkdir -p .coverage/junit poetry run coverage html -d htmlcov poetry run coverage xml -o htmlcov/coverage.xml @@ -65,6 +71,27 @@ jobs: name: fasttest-coverage path: htmlcov/ + - name: Publish Test Results (dorny) + uses: dorny/test-reporter@v2 + if: always() + with: + name: PyAirbyte Test Results (dorny) + path: .coverage/junit/test-results.xml + reporter: java-junit + fail-on-error: false + + - name: Publish Test Results (mikepenz) + uses: mikepenz/action-junit-report@v5 + if: always() + with: + report_paths: '.coverage/junit/test-results.xml' + check_name: 'PyAirbyte Test Results (mikepenz)' + fail_on_failure: false + require_tests: true + include_passed: true + detailed_summary: true + check_retries: true + - name: Upload logs to GitHub Artifacts if: failure() uses: actions/upload-artifact@v4 diff --git a/tests/test_report_demo.py b/tests/test_report_demo.py new file mode 100644 index 000000000..f41c6beeb --- /dev/null +++ b/tests/test_report_demo.py @@ -0,0 +1,9 @@ +import pytest + +def test_passing_example(): + """This test should pass to demonstrate successful test reporting.""" + assert True + +def test_failing_example(): + """This test should fail to demonstrate failure reporting.""" + assert False, "This is an intentional failure for test reporting demonstration" From 5cf7fca40d7802456d9893a8fa835f4be77075d2 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 15:51:53 -0700 Subject: [PATCH 02/11] Apply suggestions from code review --- .github/workflows/python_pytest.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index 49530a5cc..bb7b596b7 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -51,7 +51,6 @@ jobs: poetry run coverage run -m pytest --durations=5 --exitfirst -m "not slow and not requires_creds and not linting and not flaky" - --junitxml=.coverage/junit/test-results.xml - name: Print Coverage Report if: always() @@ -60,7 +59,6 @@ jobs: - name: Create Coverage Artifacts if: always() run: | - mkdir -p .coverage/junit poetry run coverage html -d htmlcov poetry run coverage xml -o htmlcov/coverage.xml From 0198d336bf3775d3faebf130d4da59f2bfc2c2c1 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 16:03:08 -0700 Subject: [PATCH 03/11] Apply suggestions from code review --- .github/workflows/python_pytest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index bb7b596b7..5310456df 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -74,7 +74,7 @@ jobs: if: always() with: name: PyAirbyte Test Results (dorny) - path: .coverage/junit/test-results.xml + path: build/test-results/**/test-results.xml reporter: java-junit fail-on-error: false @@ -82,7 +82,7 @@ jobs: uses: mikepenz/action-junit-report@v5 if: always() with: - report_paths: '.coverage/junit/test-results.xml' + report_paths: 'build/test-results/**/test-results.xml' check_name: 'PyAirbyte Test Results (mikepenz)' fail_on_failure: false require_tests: true From 8bc94a7db19a55005dfdb88f0e1f7456a62c3847 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 16:03:34 -0700 Subject: [PATCH 04/11] Update .github/workflows/python_pytest.yml --- .github/workflows/python_pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index 5310456df..7f2dc4774 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -82,7 +82,7 @@ jobs: uses: mikepenz/action-junit-report@v5 if: always() with: - report_paths: 'build/test-results/**/test-results.xml' + report_paths: 'build/test-results/**/*.xml' check_name: 'PyAirbyte Test Results (mikepenz)' fail_on_failure: false require_tests: true From 60432915ee9215e5b190c5bf16e8159787a85d95 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 16:03:51 -0700 Subject: [PATCH 05/11] Update .github/workflows/python_pytest.yml --- .github/workflows/python_pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index 7f2dc4774..e2d27719e 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -74,7 +74,7 @@ jobs: if: always() with: name: PyAirbyte Test Results (dorny) - path: build/test-results/**/test-results.xml + path: build/test-results/**/*.xml reporter: java-junit fail-on-error: false From 1f8269aa5677faab18c228ed92e498e77812815f Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 16:05:40 -0700 Subject: [PATCH 06/11] Update tests/test_report_demo.py --- tests/test_report_demo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_report_demo.py b/tests/test_report_demo.py index f41c6beeb..0a3cb7887 100644 --- a/tests/test_report_demo.py +++ b/tests/test_report_demo.py @@ -1,5 +1,6 @@ import pytest + def test_passing_example(): """This test should pass to demonstrate successful test reporting.""" assert True From a7fb8fbc5113abff38f07ff30a56527aa97deb71 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 16:43:41 -0700 Subject: [PATCH 07/11] clean up by moving mikepenz to the no-creds test --- .github/workflows/python_pytest.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index e2d27719e..e7f7424d8 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -78,18 +78,6 @@ jobs: reporter: java-junit fail-on-error: false - - name: Publish Test Results (mikepenz) - uses: mikepenz/action-junit-report@v5 - if: always() - with: - report_paths: 'build/test-results/**/*.xml' - check_name: 'PyAirbyte Test Results (mikepenz)' - fail_on_failure: false - require_tests: true - include_passed: true - detailed_summary: true - check_retries: true - - name: Upload logs to GitHub Artifacts if: failure() uses: actions/upload-artifact@v4 @@ -137,6 +125,18 @@ jobs: --durations=5 --exitfirst -m "not requires_creds and not linting and not super_slow and not flaky" + - name: Publish Test Results (mikepenz) + uses: mikepenz/action-junit-report@v5 + if: always() + with: + report_paths: 'build/test-results/**/*.xml' + check_name: 'PyAirbyte Test Results (mikepenz)' + fail_on_failure: false + require_tests: true + include_passed: true + detailed_summary: true + check_retries: true + - name: Print Coverage Report if: always() run: poetry run coverage report From f49808499cfdce84b66fe178600fd7045d02610f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 23:54:40 +0000 Subject: [PATCH 08/11] ci(test): Enhance test reporting configuration for dorny and mikepenz actions Co-Authored-By: Aaron Steers --- .github/workflows/python_pytest.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index e7f7424d8..e9d48b6c7 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -77,6 +77,11 @@ jobs: path: build/test-results/**/*.xml reporter: java-junit fail-on-error: false + list-suites: all + list-tests: all + max-annotations: 50 + detailed-summary: true + only-summary: false - name: Upload logs to GitHub Artifacts if: failure() @@ -136,6 +141,12 @@ jobs: include_passed: true detailed_summary: true check_retries: true + include_passed_in_summary: true + include_skipped_in_summary: true + include_time_in_summary: true + verbose_summary: true + comment_mode: create + comment_title: 'PyAirbyte Test Results (mikepenz)' - name: Print Coverage Report if: always() From d66d5fac45d7ce383bf0950d84bf148827564804 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 23:58:48 +0000 Subject: [PATCH 09/11] ci(test): Fix formatting issues in test_report_demo.py Co-Authored-By: Aaron Steers --- tests/test_report_demo.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_report_demo.py b/tests/test_report_demo.py index 0a3cb7887..e7df78dcd 100644 --- a/tests/test_report_demo.py +++ b/tests/test_report_demo.py @@ -1,10 +1,8 @@ -import pytest - - def test_passing_example(): """This test should pass to demonstrate successful test reporting.""" assert True + def test_failing_example(): """This test should fail to demonstrate failure reporting.""" assert False, "This is an intentional failure for test reporting demonstration" From 5bdea745a549d6a7e255a9a4951749afb3fd210c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 00:06:28 +0000 Subject: [PATCH 10/11] ci(test): Fix invalid parameters in test reporting actions Co-Authored-By: Aaron Steers --- .github/workflows/python_pytest.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index e9d48b6c7..44be7bd16 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -80,7 +80,6 @@ jobs: list-suites: all list-tests: all max-annotations: 50 - detailed-summary: true only-summary: false - name: Upload logs to GitHub Artifacts @@ -141,12 +140,9 @@ jobs: include_passed: true detailed_summary: true check_retries: true - include_passed_in_summary: true - include_skipped_in_summary: true include_time_in_summary: true verbose_summary: true - comment_mode: create - comment_title: 'PyAirbyte Test Results (mikepenz)' + comment: true - name: Print Coverage Report if: always() From b0a59c310ddabcb9ba26149a11aaef74fa3a1ff7 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 26 May 2025 17:32:46 -0700 Subject: [PATCH 11/11] Update .github/workflows/python_pytest.yml --- .github/workflows/python_pytest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_pytest.yml b/.github/workflows/python_pytest.yml index 44be7bd16..3d3fcd490 100644 --- a/.github/workflows/python_pytest.yml +++ b/.github/workflows/python_pytest.yml @@ -138,10 +138,10 @@ jobs: fail_on_failure: false require_tests: true include_passed: true - detailed_summary: true + detailed_summary: false check_retries: true include_time_in_summary: true - verbose_summary: true + verbose_summary: false comment: true - name: Print Coverage Report