1818 e2e-tests :
1919 description : " E2E Tests to run"
2020 required : True
21- default : ' ["bigquery", "dbt_redshift", "metabase", "mssql", "mysql", "redash", "snowflake", "tableau", "python", "redshift", "quicksight", "datalake_s3", "postgres", "oracle", "athena", "bigquery_multiple_project"]'
21+ default : ' ["bigquery", "dbt_redshift", "metabase", "mssql", "mysql", "redash", "snowflake", "tableau", "python-unittests", "python-integration ", "redshift", "quicksight", "datalake_s3", "postgres", "oracle", "athena", "bigquery_multiple_project"]'
2222 debug :
2323 description : " If Debugging the Pipeline, Slack and Sonar events won't be triggered [default, true or false]. Default will trigger only on main branch."
2424 required : False
@@ -45,11 +45,12 @@ jobs:
4545 strategy :
4646 fail-fast : false
4747 matrix :
48- e2e-test : ${{ fromJSON(inputs.e2e-tests || '["bigquery", "dbt_redshift", "metabase", "mssql", "mysql", "redash", "snowflake", "tableau", "python", "redshift", "quicksight", "datalake_s3", "postgres", "oracle", "athena", "bigquery_multiple_project"]') }}
48+ e2e-test : ${{ fromJSON(inputs.e2e-tests || '["bigquery", "dbt_redshift", "metabase", "mssql", "mysql", "redash", "snowflake", "tableau", "python-unittests", "python-integration ", "redshift", "quicksight", "datalake_s3", "postgres", "oracle", "athena", "bigquery_multiple_project"]') }}
4949 environment : test
5050
5151 steps :
5252 - name : Free Disk Space (Ubuntu)
53+ if : matrix.e2e-test != 'python-unittests'
5354 uses : jlumbroso/free-disk-space@main
5455 with :
5556 tool-cache : false
@@ -71,21 +72,47 @@ jobs:
7172 role-session-name : github-ci-aws-e2e-tests
7273 aws-region : ${{ secrets.E2E_AWS_REGION }}
7374
75+ - name : Setup Openmetadata Test Environment (without server)
76+ if : matrix.e2e-test == 'python-unittests'
77+ uses : ./.github/actions/setup-openmetadata-test-environment
78+ with :
79+ python-version : ' 3.10'
80+ install-server : ' false'
81+
7482 - name : Setup Openmetadata Test Environment
83+ if : matrix.e2e-test != 'python-unittests'
7584 uses : ./.github/actions/setup-openmetadata-test-environment
7685 with :
7786 python-version : ' 3.10'
7887
88+ - name : Run Python Unit Tests
89+ if : matrix.e2e-test == 'python-unittests'
90+ id : python-unittest
91+ continue-on-error : true
92+ run : |
93+ source env/bin/activate
94+ cd ingestion
95+ nox --no-venv -s unit-tests
96+ shell : bash
97+
98+ - name : Rename coverage file for Python unit tests
99+ if : matrix.e2e-test == 'python-unittests' && steps.python-unittest.outcome == 'success' && env.DEBUG == 'false'
100+ run : mv ingestion/.coverage .coverage.python-unittests
79101
80- - name : Run Python Tests & record coverage
81- if : matrix.e2e-test == 'python'
82- id : python-e2e-test
102+ - name : Run Python Integration Tests
103+ if : matrix.e2e-test == 'python-integration'
104+ id : python-integration-test
105+ continue-on-error : true
83106 run : |
84107 source env/bin/activate
85- make coverage
108+ cd ingestion
109+ nox --no-venv -s integration-tests -- --standalone --durations=5
110+ env :
111+ TESTCONTAINERS_RYUK_DISABLED : true
112+ shell : bash
86113
87114 - name : Run CLI E2E Python Tests & record coverage
88- if : matrix.e2e-test != 'python'
115+ if : matrix.e2e-test != 'python-unittests' && matrix.e2e-test != 'python-integration '
89116 id : e2e-test
90117 continue-on-error : true
91118 env :
@@ -163,47 +190,62 @@ jobs:
163190 coverage combine --data-file=.coverage.$E2E_TEST --rcfile=ingestion/pyproject.toml --keep -a .coverage*
164191 coverage report --rcfile ingestion/pyproject.toml --data-file .coverage.$E2E_TEST || true
165192
166- - name : Upload coverage artifact for Python tests
167- if : matrix.e2e-test == 'python' && steps.python-e2e-test.outcome == 'success' && env.DEBUG == 'false'
193+ - name : Upload coverage artifact for Python unit tests
194+ if : matrix.e2e-test == 'python-unittests' && steps.python-unittest.outcome == 'success' && env.DEBUG == 'false'
195+ uses : actions/upload-artifact@v4
196+ with :
197+ name : coverage-${{ matrix.e2e-test }}
198+ path : .coverage.python-unittests
199+ include-hidden-files : true
200+
201+ - name : Rename coverage file for Python integration tests
202+ if : matrix.e2e-test == 'python-integration' && steps.python-integration-test.outcome == 'success' && env.DEBUG == 'false'
203+ run : mv ingestion/.coverage .coverage.python-integration
204+
205+ - name : Upload coverage artifact for Python integration tests
206+ if : matrix.e2e-test == 'python-integration' && steps.python-integration-test.outcome == 'success' && env.DEBUG == 'false'
168207 uses : actions/upload-artifact@v4
169208 with :
170209 name : coverage-${{ matrix.e2e-test }}
171- path : .coverage
210+ path : .coverage.python-integration
211+ include-hidden-files : true
172212
173213 - name : Upload coverage artifact for CLI E2E tests
174- if : matrix.e2e-test != 'python' && steps.e2e-test.outcome == 'success' && env.DEBUG == 'false'
214+ if : matrix.e2e-test != 'python-unittests' && matrix.e2e-test != 'python-integration ' && steps.e2e-test.outcome == 'success' && env.DEBUG == 'false'
175215 uses : actions/upload-artifact@v4
176216 with :
177217 name : coverage-${{ matrix.e2e-test }}
178218 path : .coverage.${{ matrix.e2e-test }}
219+ include-hidden-files : true
179220
180221 - name : Upload tests artifact
181- if : steps.e2e-test.outcome == 'success' || steps.python-e2e- test.outcome == 'success' && env.DEBUG == 'false'
222+ if : ( steps.e2e-test.outcome == 'success' || steps.python-unittest.outcome == 'success' || steps.python-integration- test.outcome == 'success') && env.DEBUG == 'false'
182223 uses : actions/upload-artifact@v4
183224 with :
184225 name : tests-${{ matrix.e2e-test }}
185226 path : ingestion/junit/test-results-*.xml
186227
187228 - name : Clean Up
229+ if : matrix.e2e-test != 'python-unittests'
188230 run : |
189231 cd ./docker/development
190232 docker compose down --remove-orphans
191233 sudo rm -rf ${PWD}/docker-volume
192-
234+
193235 - name : Slack on Failure
194- if : steps.e2e-test.outcome != 'success' && steps.python-e2e- test.outcome != 'success' && env.DEBUG == 'false'
236+ if : ( steps.e2e-test.outcome == 'failure' || steps.python-unittest.outcome == 'failure' || steps.python-integration- test.outcome == 'failure') && env.DEBUG == 'false'
195237 uses : slackapi/slack-github-action@v1.23.0
196238 with :
197239 payload : |
198240 {
199- "text": "🔥 Failed E2E Test for: ${{ matrix.e2e-test }} 🔥\nLogs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
200- }
241+ "text": "🔥 Failed E2E Test for: ${{ matrix.e2e-test }} 🔥\nLogs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
242+ }
201243 env :
202244 SLACK_WEBHOOK_URL : ${{ secrets.E2E_SLACK_WEBHOOK }}
203245 SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
204246
205247 - name : Force failure
206- if : steps.e2e-test.outcome != 'success' && steps.python-e2e- test.outcome != 'success '
248+ if : steps.e2e-test.outcome == 'failure' || steps.python-unittest.outcome == 'failure' || steps.python-integration- test.outcome == 'failure '
207249 run : |
208250 exit 1
209251
@@ -235,7 +277,7 @@ jobs:
235277 make install_all install_test
236278
237279 - name : Download all artifacts
238- uses : actions/download-artifact@v3
280+ uses : actions/download-artifact@v4
239281 with :
240282 path : artifacts
241283
0 commit comments