Run unit tests and non-manual builds as presubmit

This commit is contained in:
Mustafa Gezen 2022-10-30 04:26:02 +01:00
parent 9089c5c16e
commit 6362ca2caf
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
3 changed files with 25 additions and 2 deletions

View File

@ -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

6
hack/non_manual_build.sh Executable file
View File

@ -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/...")

6
hack/unit_tests.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -o errexit
set -x
bazel test --config=ci //...