Skip to content

ci: add app unit tests #5

ci: add app unit tests

ci: add app unit tests #5

Workflow file for this run

# Copyright 2024 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
#
# https://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.
name: app
on:
push:
branches:
- main
paths:
- 'src/frontend_service/**'
- 'src/retrieval_service/app/**'
- '.github/workflows/app.yaml'
pull_request:
branches:
- main
paths:
- 'src/frontend_service/**'
- 'src/retrieval_service/app/**'
- '.github/workflows/app.yaml'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9","3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- run: pip install -r src/frontend_service/requirements.txt
- run: pip install -r src/frontend_service/requirements-test.txt
- name: frontend tests
working-directory: src/frontend_service
run: pytest
- run: pip install -r src/retrieval_service/requirements.txt
- run: pip install -r src/retrieval_service/requirements-test.txt
- name: retrieval tests
working-directory: src/retrieval_service
run: pytest