Skip to content

build: prevent to push without building api schema #1

build: prevent to push without building api schema

build: prevent to push without building api schema #1

name: Backend generate client
on:
push:
branches: [main]
pull_request: {}
merge_group: {}
jobs:
pytest:
permissions: write-all
# environment: development
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with dev --no-interaction --no-root
- name: Generate openapi schema
run: make generate-openapi-schema
- name: Set up Node.js and install dependencies
uses: ./.github/actions/js-install
- name: Check assistants_web is formatted
run: npm run format
- name: Check if there are changes
run: git diff --exit-code