docs(api): add missing articles #2087
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright © Michal Čihař <michal@weblate.org> | |
# | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
name: API | |
on: | |
push: | |
branches-ignore: | |
- deepsource-fix-** | |
- renovate/** | |
- weblate | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
api-lint: | |
runs-on: ubuntu-24.04 | |
name: API Lint | |
env: | |
CI_DATABASE: postgresql | |
CI_REDIS_HOST: 127.0.0.1 | |
CI_REDIS_PORT: '60001' | |
CI_DB_PASSWORD: weblate | |
CI_DB_HOST: 127.0.0.1 | |
CI_DB_PORT: '60000' | |
CI_SELENIUM: '1' | |
DJANGO_SETTINGS_MODULE: weblate.settings_test | |
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning | |
PYTHONUNBUFFERED: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
cache-dependency-glob: '' | |
cache-suffix: '3.13' | |
- name: Start services | |
run: ./ci/services-up $CI_DATABASE | |
- name: Install apt dependencies | |
run: sudo ./ci/apt-install $CI_DATABASE | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Used versions | |
run: ./ci/print-versions | |
- name: Install Python dependencies | |
run: ./ci/pip-install latest | |
- name: Prepare database | |
run: ./ci/prepare-database | |
- name: Migrate database | |
run: uv run --no-sources ./manage.py migrate --noinput --traceback | |
- name: Generate OpenAPI | |
run: | | |
echo "::add-matcher::.github/matchers/spectacular.json" | |
uv run --no-sources ./manage.py spectacular --urlconf="weblate.api.urls" > weblate-openapi.yaml | |
echo "::remove-matcher owner=spectacular::" | |
- name: openapi-lint | |
run: npx @redocly/cli lint --format github-actions weblate-openapi.yaml |