diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ba7acce32dff..628e044b2ff8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -759,6 +759,7 @@ jobs:
|| steps.tests-bq-smoke.outcome == 'failure'
|| steps.tests-iceberg.outcome == 'failure'
|| steps.tests-redshift.outcome == 'failure'
+ || steps.tests-snowflake.outcome == 'failure'
}}
upload-heap-dump: ${{ env.SECRETS_PRESENT == '' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
- name: Update PR check
diff --git a/testing/trino-tests/pom.xml b/testing/trino-tests/pom.xml
index d98d20f50d1d..87a97f098bec 100644
--- a/testing/trino-tests/pom.xml
+++ b/testing/trino-tests/pom.xml
@@ -309,5 +309,12 @@
jmh-generator-annprocess
test
+
+
+ org.yaml
+ snakeyaml
+ 2.1
+ test
+
diff --git a/testing/trino-tests/src/test/java/io/trino/tests/ci/TestCiWorkflow.java b/testing/trino-tests/src/test/java/io/trino/tests/ci/TestCiWorkflow.java
new file mode 100644
index 000000000000..de5a22caf168
--- /dev/null
+++ b/testing/trino-tests/src/test/java/io/trino/tests/ci/TestCiWorkflow.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.trino.tests.ci;
+
+import com.google.common.collect.ImmutableSet;
+import io.airlift.log.Logger;
+import org.junit.jupiter.api.Test;
+import org.yaml.snakeyaml.Yaml;
+
+import java.io.StringReader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+
+import static com.google.common.base.Verify.verifyNotNull;
+import static com.google.common.collect.ImmutableList.toImmutableList;
+import static com.google.common.collect.ImmutableMap.toImmutableMap;
+import static com.google.common.collect.ImmutableSet.toImmutableSet;
+import static com.google.common.collect.MoreCollectors.onlyElement;
+import static java.util.Locale.ENGLISH;
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class TestCiWorkflow
+{
+ private static final Logger log = Logger.get(TestCiWorkflow.class);
+
+ private static final Path CI_YML_REPO_PATH = Paths.get(".github/workflows/ci.yml");
+
+ @Test
+ public void testUploadTestResultsCondition()
+ throws Exception
+ {
+ String uploadTestResultsStepName = "Upload test results";
+ Set nonTestSteps = ImmutableSet.of(
+ uploadTestResultsStepName,
+ "Maven Install");
+
+ Yaml yaml = new Yaml();
+ Map, ?> workflow = yaml.load(new StringReader(Files.readString(findRepositoryRoot().resolve(CI_YML_REPO_PATH))));
+ Map jobs = getMap(workflow, "jobs");
+ Map test = getMap(jobs, "test");
+ List> steps = getList(test, "steps");
+
+ List