Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions .github/bin/build-matrix-from-impacted.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def build(matrix_file, impacted_file, output_file):
modules = item.get("modules", [])
if isinstance(modules, str):
modules = [modules]
if not any(module in impacted for module in modules):
if impacted and not any(module in impacted for module in modules):
logging.info("Excluding matrix section: %s", item)
continue
include.append(
Expand All @@ -68,8 +68,7 @@ def build(matrix_file, impacted_file, output_file):
"profile": item.get("profile", ""),
}
)
if include:
matrix["include"] = include
matrix["include"] = include
json.dump(matrix, output_file)
output_file.write("\n")

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ jobs:
$RETRY $MAVEN validate ${MAVEN_FAST_INSTALL} -P disable-check-spi-dependencies -pl '!:trino-docs,!:trino-server,!:trino-server-rpm'
- id: set-matrix
run: |
# GIB doesn't run on master, so make sure the file always exist
touch gib-impacted.log
cat <<EOF > .github/test-matrix.yaml
include:
- { modules: core/trino-main }
Expand Down Expand Up @@ -401,7 +403,7 @@ jobs:
- { modules: [ client/trino-jdbc, plugin/trino-base-jdbc, plugin/trino-thrift, plugin/trino-memory ] }
- { modules: plugin/trino-bigquery }
EOF
./.github/bin/build-matrix-from-impacted.py -v -m .github/test-matrix.yaml -o matrix.json
./.github/bin/build-matrix-from-impacted.py -v -i gib-impacted.log -m .github/test-matrix.yaml -o matrix.json
echo "Matrix: $(jq '.' matrix.json)"
echo "::set-output name=matrix::$(jq -c '.' matrix.json)"

Expand Down