Skip to content

Add readme about Redis cache #75

Add readme about Redis cache

Add readme about Redis cache #75

Workflow file for this run

name: Automation API
on: push
env:
OPENAI_API_KEY: invalid-openai-api-key-for-ci
OPENAI_ORG_ID: invalid-openai-org-id-for-ci
defaults:
run:
working-directory: automation-api
jobs:
lint:
name: "(automation-api) Lint"
runs-on: ubuntu-latest
strategy:
matrix:
python: [ 3.11 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Load cached pre-commit environment
uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{matrix.python}}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Lint
run: pre-commit run --all-files
test:
name: "(automation-api) Test"
runs-on: ubuntu-latest
strategy:
matrix:
python: [ 3.11 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Load cached Poetry installation
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('.github/workflows/automation-api.yaml') }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.6.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: automation-api/.venv
key: venv-${{ runner.os }}-${{matrix.python}}-${{ hashFiles('automation-api/poetry.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Run tests
run: poetry run poe pytest