Skip to content

Export analysis results #461

Export analysis results

Export analysis results #461

name: Update OpenAPI spec
on:
# Triggers the workflow on pull request events
push:
branches:
- main
- mwp_v1
pull_request:
paths:
- "backend/**"
- ".github/**"
- "docker/**"
- "frontend/**"
jobs:
update-openapi-spec:
runs-on: ubuntu-latest
env:
API_PRODUCTION_WORKERS: 1
RAY_ENABLED: False
OLLAMA_ENABLED: False
API_EXPOSED: 5500
VITE_APP_SERVER: http://localhost:5500
steps:
- uses: actions/checkout@v3
- name: Checkout PR
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr checkout ${{ github.event.pull_request.number }}
- name: Start Docker Containers
run: |
cd docker
./setup-folders.sh
cp .env.example .env
chmod -R a+rwx backend_repo/ models_cache/ spacy_models/
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray --disable_ollama
export GID=$(id -g)
docker compose -f compose-test.yml up -d --quiet-pull --wait --wait-timeout 300
echo Waiting for containers to start...
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: frontend/package.json
- name: Install npm dependencies
working-directory: frontend
run: npm ci -f
- name: Update spec
working-directory: frontend
run: |
npm run update-api
npm run generate-api
- name: Check that frontend builds without error
working-directory: frontend
run: npm run build
- uses: EndBug/add-and-commit@v9
if: github.event_name == 'pull_request'
with:
add: "frontend/src/api"
message: "Update OpenAPI spec and client"
pathspec_error_handling: exitImmediately
default_author: github_actions