Skip to content

chore(deps): Update actions/checkout action to v4 - autoclosed #34

chore(deps): Update actions/checkout action to v4 - autoclosed

chore(deps): Update actions/checkout action to v4 - autoclosed #34

Workflow file for this run

# 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.
name: Backend tests
on:
push:
branches:
- main
paths:
- 'src/gcf/**'
- '.github/workflows/backend.yml'
pull_request:
branches:
- main
paths:
- 'src/gcf/**'
- '.github/workflows/backend.yml'
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: src/gcf/env
key: ${{ runner.os }}-venv-${{ hashFiles('src/gcf/requirements.txt') }}
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
working-directory: src/gcf
- name: Run Pytest
run: |
source venv/bin/activate
pytest
working-directory: src/gcf
env:
PYTHONPATH: ${{ github.workspace }}/src/gcf