From 6362ca2cafc6732785190be4ef4c3f608acb7518 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Sun, 30 Oct 2022 04:26:02 +0100 Subject: [PATCH] Run unit tests and non-manual builds as presubmit --- config/jobs/presubmits.yaml | 15 +++++++++++++-- hack/non_manual_build.sh | 6 ++++++ hack/unit_tests.sh | 6 ++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 hack/non_manual_build.sh create mode 100755 hack/unit_tests.sh diff --git a/config/jobs/presubmits.yaml b/config/jobs/presubmits.yaml index 3d182cb0..da955180 100644 --- a/config/jobs/presubmits.yaml +++ b/config/jobs/presubmits.yaml @@ -21,6 +21,17 @@ presubmits: decorate: true spec: containers: - - image: alpine + - image: quay.io/peridot/ci:v0.3.16 command: - - /bin/date + - hack/unit_tests.sh + + - name: pull-peridot-non-manual-build + branches: + - main + always_run: true + decorate: true + spec: + containers: + - image: quay.io/peridot/ci:v0.3.16 + command: + - hack/non_manual_build.sh diff --git a/hack/non_manual_build.sh b/hack/non_manual_build.sh new file mode 100755 index 00000000..5856a0a1 --- /dev/null +++ b/hack/non_manual_build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -o errexit +set -x + +bazel build --config=ci $(bazel query "//... except attr(tags, 'manual', //...) except //vendor/...") diff --git a/hack/unit_tests.sh b/hack/unit_tests.sh new file mode 100755 index 00000000..268d372a --- /dev/null +++ b/hack/unit_tests.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -o errexit +set -x + +bazel test --config=ci //...