From 51f0e51e896cf2e29bfdcd9e14b52ccc4300be68 Mon Sep 17 00:00:00 2001 From: Yuan <45984206+Yuan325@users.noreply.github.com> Date: Fri, 5 Jan 2024 02:42:26 +0800 Subject: [PATCH] feat: add app_test cicd workflow (#157) Co-authored-by: Averi Kitsch --- retrieval_service/app.tests.cloudbuild.yaml | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 retrieval_service/app.tests.cloudbuild.yaml diff --git a/retrieval_service/app.tests.cloudbuild.yaml b/retrieval_service/app.tests.cloudbuild.yaml new file mode 100644 index 00000000..98d27ce5 --- /dev/null +++ b/retrieval_service/app.tests.cloudbuild.yaml @@ -0,0 +1,37 @@ +# Copyright 2023 Google LLC +# +# 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. + +steps: + - id: Install dependencies + name: python:3.11 + dir: retrieval_service + entrypoint: pip + args: + [ + "install", + "-r", + "requirements.txt", + "-r", + "requirements-test.txt", + "--user", + ] + + - id: Run retrieval service app tests + name: python:3.11 + dir: retrieval_service/app + entrypoint: /bin/bash + args: + - "-c" + - | + python -m pytest app_test.py