potiuk commented on PR #30839:
URL: https://github.com/apache/airflow/pull/30839#issuecomment-1521969456
Running last tests, and I think in the current version of selective checks
and the tests show the intentions much better and the code is cleaner
(extracted the important bits):
```
ALL_DOCS_SELECTED_FOR_BUILD = ""
ALL_PROVIDERS_AFFECTED = ""
pytest.param(
("INTHEWILD.md",),
{
"affected-providers-list-as-string": None,
"run-tests": "false",
"docs-build": "false",
"docs-filter-list-as-string": None,
"skip-provider-tests": "true",
"parallel-test-types-list-as-string": None,
},
id="Nothing should run if only non-important files changed",
),
pytest.param(
("tests/system/any_file.py",),
{
"affected-providers-list-as-string": None,
"run-tests": "true",
"docs-build": "true",
"docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"skip-provider-tests": "true",
"parallel-test-types-list-as-string": "Always",
},
id="Only Always and docs build should run if only system tests
changed",
),
pytest.param(
(
"airflow/cli/test.py",
"chart/aaaa.txt",
"tests/providers/google/file.py",
),
{
"affected-providers-list-as-string": "amazon apache.beam
apache.cassandra "
"cncf.kubernetes common.sql "
"facebook google hashicorp microsoft.azure microsoft.mssql
mysql "
"oracle postgres presto salesforce sftp ssh trino",
"run-tests": "true",
"docs-build": "true",
"docs-filter-list-as-string": "--package-filter
apache-airflow --package-filter helm-chart "
"--package-filter apache-airflow-providers-amazon "
"--package-filter apache-airflow-providers-apache-beam "
"--package-filter apache-airflow-providers-apache-cassandra "
"--package-filter apache-airflow-providers-cncf-kubernetes "
"--package-filter apache-airflow-providers-common-sql "
"--package-filter apache-airflow-providers-facebook "
"--package-filter apache-airflow-providers-google "
"--package-filter apache-airflow-providers-hashicorp "
"--package-filter apache-airflow-providers-microsoft-azure "
"--package-filter apache-airflow-providers-microsoft-mssql "
"--package-filter apache-airflow-providers-mysql "
"--package-filter apache-airflow-providers-oracle "
"--package-filter apache-airflow-providers-postgres "
"--package-filter apache-airflow-providers-presto "
"--package-filter apache-airflow-providers-salesforce "
"--package-filter apache-airflow-providers-sftp "
"--package-filter apache-airflow-providers-ssh "
"--package-filter apache-airflow-providers-trino",
"skip-provider-tests": "false",
"parallel-test-types-list-as-string": "Providers[amazon]
Always CLI "
"Providers[apache.beam,apache.cassandra,cncf.kubernetes,common.sql,facebook,"
"hashicorp,microsoft.azure,microsoft.mssql,mysql,oracle,postgres,presto,"
"salesforce,sftp,ssh,trino] Providers[google]",
},
id="CLI tests and Google-related provider tests should run if
cli/chart files changed",
),
pytest.param(
(
"airflow/cli/file.py",
"airflow/www/file.py",
"airflow/api/file.py",
),
{
"affected-providers-list-as-string": None,
"run-tests": "true",
"docs-build": "true",
"docs-filter-list-as-string": "--package-filter
apache-airflow",
"skip-provider-tests": "true",
"parallel-test-types-list-as-string": "WWW API Always CLI",
},
id="No providers tests should run if only CLI/API/WWW file
changed",
),
pytest.param(
("airflow/models/test.py",),
{
"affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"run-tests": "true",
"docs-build": "true",
"docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"run-kubernetes-tests": "false",
"skip-provider-tests": "false",
"parallel-test-types-list-as-string": "Core
Providers[-amazon,google] Other "
"Providers[amazon] WWW "
"API Always CLI Providers[google]",
},
id="Tests for all providers should run if model file changed",
),
pytest.param(
("airflow/file.py",),
{
"affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"run-tests": "true",
"docs-build": "true",
"docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"skip-provider-tests": "false",
"parallel-test-types-list-as-string": "Core
Providers[-amazon,google] Other "
"Providers[amazon] WWW "
"API Always CLI Providers[google]",
},
id="Tests for all providers should run if any other than
API/WWW/CLI file changed.",
),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]